Skip to content

Commit

Permalink
KBP-137 #time 10m - added mail_test_helpers file
Browse files Browse the repository at this point in the history
  • Loading branch information
FatihAvsan committed Nov 2, 2017
1 parent a6c7940 commit b88705e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

RSpec.configure do |config|
config.include CybeleTestHelpers
config.include TestHelpers
config.include MailTestHelpers

config.before(:all) do
create_tmp_directory
Expand Down
16 changes: 0 additions & 16 deletions spec/support/cybele_test_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions spec/support/mail_test_helpers.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b88705e

Please sign in to comment.