db_cleaner.rb 206 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 require 'database_cleaner' DatabaseCleaner[:active_record].strategy = :truncation Spinach.hooks.before_scenario do DatabaseCleaner.start end Spinach.hooks.after_scenario do DatabaseCleaner.clean end