Commit 7a89cef601dde68d5964f68bb6fe2e94d72fcf55
Exists in
spb-stable
and in
2 other branches
Merge pull request #7092 from jvanbaarsen/tmp-fix-for-rspec
Temp fix for rspec so the specs are run again
Showing
3 changed files
with
24 additions
and
5 deletions
Show diff stats
Gemfile.lock
spec/spec_helper.rb
... | ... | @@ -27,6 +27,8 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} |
27 | 27 | WebMock.disable_net_connect!(allow_localhost: true) |
28 | 28 | |
29 | 29 | RSpec.configure do |config| |
30 | + config.use_transactional_fixtures = false | |
31 | + config.use_instantiated_fixtures = false | |
30 | 32 | config.mock_with :rspec |
31 | 33 | |
32 | 34 | config.include LoginHelpers, type: :feature |
... | ... | @@ -39,7 +41,6 @@ RSpec.configure do |config| |
39 | 41 | # If you're not using ActiveRecord, or you'd prefer not to run each of your |
40 | 42 | # examples within a transaction, remove the following line or assign false |
41 | 43 | # instead of true. |
42 | - config.use_transactional_fixtures = false | |
43 | 44 | |
44 | 45 | config.before(:suite) do |
45 | 46 | TestEnv.init(observers: false, init_repos: true, repos: false) | ... | ... |
spec/support/db_cleaner.rb
1 | +# RSpec.configure do |config| | |
2 | + | |
3 | +# config.around(:each) do |example| | |
4 | +# DatabaseCleaner.strategy = :transaction | |
5 | +# DatabaseCleaner.clean_with(:truncation) | |
6 | +# DatabaseCleaner.cleaning do | |
7 | +# example.run | |
8 | +# end | |
9 | +# end | |
10 | + | |
11 | +# config.around(:each, js: true) do |example| | |
12 | +# DatabaseCleaner.strategy = :truncation | |
13 | +# DatabaseCleaner.clean_with(:truncation) | |
14 | +# DatabaseCleaner.cleaning do | |
15 | +# example.run | |
16 | +# end | |
17 | +# end | |
18 | +# end | |
1 | 19 | RSpec.configure do |config| |
2 | - config.around(:each) do | |
20 | + config.before(:suite) do | |
3 | 21 | DatabaseCleaner.clean_with(:truncation) |
4 | 22 | end |
5 | 23 | |
6 | - config.around(:each) do | |
24 | + config.before(:each) do | |
7 | 25 | DatabaseCleaner.strategy = :transaction |
8 | 26 | end |
9 | 27 | |
10 | - config.around(:each, js: true) do | |
28 | + config.before(:each, :js => true) do | |
11 | 29 | DatabaseCleaner.strategy = :truncation |
12 | 30 | end |
13 | 31 | ... | ... |