From b88705e7a8e2102fbb76b9bf0f0d8fdc6304aaaf Mon Sep 17 00:00:00 2001 From: FatihAvsan Date: Thu, 2 Nov 2017 15:09:03 +0300 Subject: [PATCH] KBP-137 #time 10m - added mail_test_helpers file --- spec/spec_helper.rb | 2 +- spec/support/cybele_test_helpers.rb | 16 ---------------- spec/support/mail_test_helpers.rb | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 spec/support/mail_test_helpers.rb diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 86c1086..ab998c3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,7 +11,7 @@ RSpec.configure do |config| config.include CybeleTestHelpers - config.include TestHelpers + config.include MailTestHelpers config.before(:all) do create_tmp_directory diff --git a/spec/support/cybele_test_helpers.rb b/spec/support/cybele_test_helpers.rb index 95a602f..3102b97 100644 --- a/spec/support/cybele_test_helpers.rb +++ b/spec/support/cybele_test_helpers.rb @@ -85,19 +85,3 @@ def root_path File.expand_path('../../../', __FILE__) end end - -module TestHelpers - def mail_test_helper(path) - file = content(path) - expect(file).to match('smtp') - expect(file).to match('address:') - expect(file).to match('port:') - expect(file).to match('enable_starttls_auto:') - expect(file).to match('user_name:') - expect(file).to match('password:') - expect(file).to match('authentication:') - unless content('config/settings.yml').present? - expect(file).to match('host:') - end - end -end \ No newline at end of file diff --git a/spec/support/mail_test_helpers.rb b/spec/support/mail_test_helpers.rb new file mode 100644 index 0000000..1eb6b3e --- /dev/null +++ b/spec/support/mail_test_helpers.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module MailTestHelpers + def mail_test_helper(path) + file = content(path) + expect(file).to match('smtp') + expect(file).to match('address:') + expect(file).to match('port:') + expect(file).to match('enable_starttls_auto:') + expect(file).to match('user_name:') + expect(file).to match('password:') + expect(file).to match('authentication:') + unless content('config/settings.yml').present? + expect(file).to match('host:') + end + end +end \ No newline at end of file