-
Notifications
You must be signed in to change notification settings - Fork 112
Fixtures
Gabriel Sobrinho edited this page Mar 3, 2016
·
2 revisions
If you want to use fixtures on turnip features, add this code to spec_helper.rb
or turnip_helper.rb
:
RSpec.configure do |config|
config.before(:each, type: :feature) do
fixture_path = "#{Rails.root}/spec/fixtures"
fixtures = Dir["#{fixture_path}/**/*.yml"].map { |f| File.basename(f, '.yml') }
ActiveRecord::FixtureSet.create_fixtures(fixture_path, fixtures)
end
end
It will load all fixtures under spec/fixtures
before each scenario.