Если я использую rake cucumber
, приборы не загружены и мои тесты не пройдены.Если я использую cucumber --tag @tagname
для запуска сценария, он загружает приборы, фабрики и все проходит.
Нижняя часть моего /features/support/env.rb
выглядит следующим образом:
Cucumber::Rails::World.use_transactional_fixtures = true
Fixtures.reset_cache
fixtures_folder = File.join(RAILS_ROOT, 'spec', 'fixtures')
fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
Fixtures.create_fixtures(fixtures_folder, fixtures)
if defined?(ActiveRecord::Base)
begin
require 'database_cleaner'
DatabaseCleaner.strategy = :truncation
rescue LoadError => ignore_if_database_cleaner_not_present
end
end
Все остальное довольностандартные рельсы 3.