我正在使用Cucumber with Selenium, FixtureReplacement and DatabaseCleaner。
我在FixtureReplacement中创建的我的数据,从我的测验中无法获得。
I have added an own rails environment for selenium and I am using an own profile for my enhanced selenium features. My cucumber setup for the selenium profile is:
Webrat.configure do |config|
config.mode = :selenium
config.application_environment = :selenium
end
Cucumber::Rails::World.use_transactional_fixtures = false
require "database_cleaner"
# Clean the database once when starting
DatabaseCleaner.clean_with :truncation
DatabaseCleaner.strategy = :truncation
Before do
DatabaseCleaner.start
include FixtureReplacement
end
After do
DatabaseCleaner.clean
end
# this is necessary to have webrat "wait_for" the response body to be available
# when writing steps that match against the response body returned by selenium
World(Webrat::Selenium::Matchers)
溶解功能良好,我已在铁路网进行了检测。
我的ium特征是:
RAILS_ENV=selenium cucumber -p selenium features/enhanced/test.feature
没有人知道这个问题的解决办法?
最佳做法