【发布时间】:2011-08-30 16:57:54
【问题描述】:
在我的 features/support/env.rb 文件的顶部:
ENV["RAILS_ENV"] = 'test'
但测试仍然会修改开发数据库.... 即使我这样做了
rake cucumber:authentication RAILS_ENV=test
它仍然会改变开发数据库
我还需要改变什么?
数据库.yml:
development:
adapter: mysql
encoding: utf8
database: app_dev
username: root
password:
test:
adapter: mysql
encoding: utf8
database: app_test
username: root
password:
production:
adapter: mysql
encoding: utf8
database: app_production
username: root
password:
cucumber: &CUCUMBER
adapter: mysql
encoding: utf8
database: app_cuke
username: root
password:
culerity:
<<: *CUCUMBER
使用:
ruby 1.8.7
rails 2.3.8
and cucumber 1.0.2
【问题讨论】: