diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 11a83bd9501..2962225859d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -66,7 +66,11 @@ RSpec.configure do |config| config.display_try_failure_messages = true config.infer_spec_type_from_file_location! - config.full_backtrace = !!ENV['CI'] + + # Add :full_backtrace tag to an example if full_backtrace output is desired + config.before(:each, full_backtrace: true) do |example| + config.full_backtrace = true + end unless ENV['CI'] # Re-run failures locally with `--only-failures` @@ -124,6 +128,7 @@ RSpec.configure do |config| config.include LoginHelpers, type: :feature config.include SearchHelpers, type: :feature config.include WaitHelpers, type: :feature + config.include WaitForRequests, type: :feature config.include EmailHelpers, :mailer, type: :mailer config.include Warden::Test::Helpers, type: :request config.include Gitlab::Routing, type: :routing @@ -133,7 +138,6 @@ RSpec.configure do |config| config.include InputHelper, :js config.include SelectionHelper, :js config.include InspectRequests, :js - config.include WaitForRequests, :js config.include LiveDebugger, :js config.include MigrationsHelpers, :migration config.include RedisHelpers @@ -233,6 +237,12 @@ RSpec.configure do |config| # expect(Gitlab::Git::KeepAround).to receive(:execute).and_call_original allow(Gitlab::Git::KeepAround).to receive(:execute) + # Stub these calls due to being expensive operations + # It can be reenabled for specific tests via: + # + # expect(Gitlab::JobWaiter).to receive(:wait).and_call_original + allow_any_instance_of(Gitlab::JobWaiter).to receive(:wait) + Gitlab::ProcessMemoryCache.cache_backend.clear Sidekiq::Worker.clear_all |