Replace DatabaseCleaner with DatabaseRewinder
This commit is contained in:
parent
15dd1b6bca
commit
0f2d2bd44d
3 changed files with 10 additions and 7 deletions
2
Gemfile
2
Gemfile
|
|
@ -246,7 +246,7 @@ group :test do
|
|||
# Cucumber (integration tests)
|
||||
|
||||
gem 'capybara', '2.4.4'
|
||||
gem 'database_cleaner', '1.4.0'
|
||||
gem 'database_rewinder', '0.5.1'
|
||||
gem 'selenium-webdriver', '2.45.0'
|
||||
|
||||
# General helpers
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ GEM
|
|||
mime-types (>= 1.16, < 3)
|
||||
nokogiri (~> 1.5)
|
||||
rails (>= 3, < 5)
|
||||
database_cleaner (1.4.0)
|
||||
database_rewinder (0.5.1)
|
||||
debugger-linecache (1.2.0)
|
||||
devise (3.4.1)
|
||||
bcrypt (~> 3.0)
|
||||
|
|
@ -703,7 +703,7 @@ DEPENDENCIES
|
|||
compass-rails (= 2.0.4)
|
||||
configurate (= 0.2.0)
|
||||
cucumber-rails (= 1.4.2)
|
||||
database_cleaner (= 1.4.0)
|
||||
database_rewinder (= 0.5.1)
|
||||
devise (= 3.4.1)
|
||||
devise-token_authenticatable (~> 0.3.0)
|
||||
devise_lastseenable (= 0.0.4)
|
||||
|
|
|
|||
|
|
@ -45,12 +45,15 @@ Capybara.default_wait_time = 15
|
|||
# of your scenarios, as this makes it hard to discover errors in your application.
|
||||
ActionController::Base.allow_rescue = false
|
||||
|
||||
require 'database_cleaner'
|
||||
require 'database_cleaner/cucumber'
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
DatabaseCleaner.orm = "active_record"
|
||||
Cucumber::Rails::Database.autorun_database_cleaner = false
|
||||
Cucumber::Rails::World.use_transactional_fixtures = false
|
||||
|
||||
DatabaseRewinder.clean_all
|
||||
|
||||
After do
|
||||
DatabaseRewinder.clean
|
||||
end
|
||||
|
||||
require File.join(File.dirname(__FILE__), "integration_sessions_controller")
|
||||
require File.join(File.dirname(__FILE__), "poor_mans_webmock")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue