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