summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 3fedb9ed48c..89357056c93 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -115,7 +115,7 @@ RSpec.configure do |config|
TestEnv.clean_test_path
end
- config.before(:example) do
+ config.before do
# Enable all features by default for testing
allow(Feature).to receive(:enabled?) { true }
@@ -136,11 +136,11 @@ RSpec.configure do |config|
RequestStore.clear!
end
- config.after(:example) do
+ config.after do
Fog.unmock! if Fog.mock?
end
- config.after(:example) do
+ config.after do
Gitlab::CurrentSettings.clear_in_memory_application_settings!
end
@@ -216,15 +216,19 @@ RSpec.configure do |config|
# Each example may call `migrate!`, so we must ensure we are migrated down every time
config.before(:each, :migration) do
+ use_fake_application_settings
+
schema_migrate_down!
end
config.after(:context, :migration) do
schema_migrate_up!
+
+ Gitlab::CurrentSettings.clear_in_memory_application_settings!
end
config.around(:each, :nested_groups) do |example|
- example.run if Group.supports_nested_groups?
+ example.run if Group.supports_nested_objects?
end
config.around(:each, :postgresql) do |example|
@@ -235,10 +239,6 @@ RSpec.configure do |config|
example.run if Gitlab::Database.mysql?
end
- config.around(:each, :rails5) do |example|
- example.run if Gitlab.rails5?
- end
-
# This makes sure the `ApplicationController#can?` method is stubbed with the
# original implementation for all view specs.
config.before(:each, type: :view) do