Skip to content
Snippets Groups Projects
Commit 6dcbd646 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

disable mailer for Spinach

parent b8ba0b75
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -35,7 +35,7 @@ Capybara.ignore_hidden_elements = false
DatabaseCleaner.strategy = :truncation
 
Spinach.hooks.before_scenario do
TestEnv.init
TestEnv.init(mailer: false)
 
DatabaseCleaner.start
end
Loading
Loading
Loading
Loading
@@ -21,6 +21,10 @@ module TestEnv
#
disable_observers if opts[:observers] == false
 
# Disable mailer for spinach tests
disable_mailer if opts[:mailer] == false
# Use tmp dir for FS manipulations
repos_path = Rails.root.join('tmp', 'test-git-base-path')
Gitlab.config.gitlab_shell.stub(repos_path: repos_path)
Loading
Loading
@@ -76,4 +80,8 @@ module TestEnv
def disable_observers
ActiveRecord::Base.observers.disable(:all)
end
def disable_mailer
ActionMailer::Base.perform_deliveries = false
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment