Created
April 11, 2011 09:01
-
-
Save corroded/913257 to your computer and use it in GitHub Desktop.
put this in features/support/env.rb right after: if defined?(ActiveRecord::Base) begin require 'database_cleaner' DatabaseCleaner.strategy = :truncation rescue LoadError => ignore_if_database_cleaner_not_present end en
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before do | |
#Seed the DB | |
Fixtures.reset_cache | |
fixtures_folder = File.join(RAILS_ROOT, 'test', 'fixtures') | |
fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') } | |
Fixtures.create_fixtures(fixtures_folder, fixtures) | |
puts "Loading fixtures...." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment