From 72be1f12893c5149db24ecd80326c7ff1e456a0b Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 28 Jan 2013 23:59:15 -0200 Subject: [PATCH] Match against string value, no need to create regexps --- test/mailers/confirmation_instructions_test.rb | 2 +- test/mailers/reset_password_instructions_test.rb | 2 +- test/mailers/unlock_instructions_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/mailers/confirmation_instructions_test.rb b/test/mailers/confirmation_instructions_test.rb index 213923d9..b44352b4 100644 --- a/test/mailers/confirmation_instructions_test.rb +++ b/test/mailers/confirmation_instructions_test.rb @@ -70,7 +70,7 @@ class ConfirmationInstructionsTest < ActionMailer::TestCase end test 'body should have user info' do - assert_match /#{user.email}/, mail.body.encoded + assert_match user.email, mail.body.encoded end test 'body should have link to confirm the account' do diff --git a/test/mailers/reset_password_instructions_test.rb b/test/mailers/reset_password_instructions_test.rb index 887021b4..96f72fa6 100644 --- a/test/mailers/reset_password_instructions_test.rb +++ b/test/mailers/reset_password_instructions_test.rb @@ -66,7 +66,7 @@ class ResetPasswordInstructionsTest < ActionMailer::TestCase end test 'body should have user info' do - assert_match(/#{user.email}/, mail.body.encoded) + assert_match user.email, mail.body.encoded end test 'body should have link to confirm the account' do diff --git a/test/mailers/unlock_instructions_test.rb b/test/mailers/unlock_instructions_test.rb index a0cf2abd..4e1e532e 100644 --- a/test/mailers/unlock_instructions_test.rb +++ b/test/mailers/unlock_instructions_test.rb @@ -66,7 +66,7 @@ class UnlockInstructionsTest < ActionMailer::TestCase end test 'body should have user info' do - assert_match(/#{user.email}/, mail.body.encoded) + assert_match user.email, mail.body.encoded end test 'body should have link to unlock the account' do