From ab0388df15197e0aea9f22f27f5163cdf832875d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 23 Aug 2015 23:25:31 +0200 Subject: [PATCH] Fixed rubocops. --- lib/email_helper/verify.rb | 2 +- test/unit/email_helper_test.rb | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/email_helper/verify.rb b/lib/email_helper/verify.rb index 8fcaecf69..1a1536d4e 100644 --- a/lib/email_helper/verify.rb +++ b/lib/email_helper/verify.rb @@ -77,7 +77,7 @@ or found = Channel::Pop3.new.fetch( { options: params[:inbound][:options] }, 'verify', subject ) end rescue => e - result { + result = { result: 'invalid', message: e.to_s, subject: subject, diff --git a/test/unit/email_helper_test.rb b/test/unit/email_helper_test.rb index 6b1f675c8..8cfa26279 100644 --- a/test/unit/email_helper_test.rb +++ b/test/unit/email_helper_test.rb @@ -229,8 +229,7 @@ class EmailHelperTest < ActiveSupport::TestCase # realtest - test I if !ENV['EMAILHELPER_MAILBOX_1'] - raise "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" - return + fail "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" end mailbox_user = ENV['EMAILHELPER_MAILBOX_1'].split(':')[0] mailbox_password = ENV['EMAILHELPER_MAILBOX_1'].split(':')[1] @@ -359,8 +358,7 @@ class EmailHelperTest < ActiveSupport::TestCase # realtest - test I if !ENV['EMAILHELPER_MAILBOX_1'] - raise "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" - return + fail "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" end mailbox_user = ENV['EMAILHELPER_MAILBOX_1'].split(':')[0] mailbox_password = ENV['EMAILHELPER_MAILBOX_1'].split(':')[1] @@ -392,7 +390,7 @@ class EmailHelperTest < ActiveSupport::TestCase # realtest - test I if !ENV['EMAILHELPER_MAILBOX_1'] - raise "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" + fail "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" end mailbox_user = ENV['EMAILHELPER_MAILBOX_1'].split(':')[0] mailbox_password = ENV['EMAILHELPER_MAILBOX_1'].split(':')[1] @@ -411,7 +409,7 @@ class EmailHelperTest < ActiveSupport::TestCase # realtest - test I if !ENV['EMAILHELPER_MAILBOX_1'] - raise "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" + fail "Need EMAILHELPER_MAILBOX_1 as ENV variable like export EMAILHELPER_MAILBOX_1='unittestemailhelper01@znuny.com:somepass'" end mailbox_user = ENV['EMAILHELPER_MAILBOX_1'].split(':')[0] mailbox_password = ENV['EMAILHELPER_MAILBOX_1'].split(':')[1]