Commits

Toshi MARUYAMA committed 5863284

use database_cleaner (#12822)

  • Participants
  • Parent commits 0f40c45

Comments (0)

Files changed (2)

   if RUBY_VERSION >= '1.9.3'
     gem "capybara", "~> 2.1.0"
     gem "selenium-webdriver"
+    gem "database_cleaner"
   end
 end
 

File test/ui/base.rb

   Capybara::Selenium::Driver.new(app, :browser => :remote)
 end
 
+DatabaseCleaner.strategy = :truncation
+
 module Redmine
   module UiTest
     # Base class for UI tests
       teardown do
         Capybara.reset_sessions!    # Forget the (simulated) browser state
         Capybara.use_default_driver # Revert Capybara.current_driver to Capybara.default_driver
+        DatabaseCleaner.clean
       end
     end
   end