Sha256: 05fe3454f31598b6d016ca2abe379d4685c3cb4591858b3ff7f90e5f57327b1e

Contents?: true

Size: 519 Bytes

Versions: 15

Compression:

Stored size: 519 Bytes

Contents

if ::ActiveRecord::VERSION::MAJOR < 4
  fixture_class = ActiveRecord::Fixtures
else
  fixture_class = ActiveRecord::FixtureSet
end

fixtures_folder = File.join('test', 'fixtures')
fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
if defined? RailsCsvFixtures
  fixtures += Dir[File.join(fixtures_folder, '*.csv')].map {|f| File.basename(f, '.csv') }
end

Before do
  fixture_class.create_fixtures(fixtures_folder, fixtures)
end

After do |scenario|
  fixture_class.reset_cache
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
daddy-0.5.24 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.23 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.22 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.21 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.20 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.19 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.18 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.17 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.16 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.15 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.14 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.13 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.12 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.11 lib/daddy/cucumber/hooks/fixtures.rb
daddy-0.5.10 lib/daddy/cucumber/hooks/fixtures.rb