diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-11 23:54:20 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-11 23:54:20 +0300 |
commit | ef2c8593b9f80951e97fadb5a3c9c5cdf0f1b1c9 (patch) | |
tree | f929334f547540582512b47be805bfc1cb8ef87a /spec/support/test_env.rb | |
parent | e996c52636f46b193b5ff7291e9b835c317e5438 (diff) | |
download | gitlab-ce-ef2c8593b9f80951e97fadb5a3c9c5cdf0f1b1c9.tar.gz |
Disable mailer for spinach
Diffstat (limited to 'spec/support/test_env.rb')
-rw-r--r-- | spec/support/test_env.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 175698ac9c9..8a2e004f824 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -1,3 +1,5 @@ +require 'rspec/mocks' + module TestEnv extend self @@ -13,6 +15,8 @@ module TestEnv # - remove_key # def init(opts = {}) + RSpec::Mocks::setup(self) + # Disable observers to improve test speed # # You can enable it in whole test case where needed by next string: @@ -82,6 +86,6 @@ module TestEnv end def disable_mailer - ActionMailer::Base.perform_deliveries = false + NotificationService.any_instance.stub(mailer: double.as_null_object) end end |