aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-29 18:50:23 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-29 18:50:23 +1100
commitb02d852a1458a39e1d83b6b58d74b93320764892 (patch)
tree405fabdbb89dbaaae0dc715dadec003450a2d247 /spec/controllers/user_controller_spec.rb
parent97c4683e47bdbac4d170780cf2b765940fcd0168 (diff)
When matching mail.body with regex cast to string first
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 519e17441..2692cada4 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -167,7 +167,7 @@ describe UserController, "when signing in" do
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1
mail = deliveries[0]
- mail.body =~ /(http:\/\/.*(\/c\/(.*)))/
+ mail.body.to_s =~ /(http:\/\/.*(\/c\/(.*)))/
mail_url = $1
mail_path = $2
mail_token = $3
@@ -199,7 +199,7 @@ describe UserController, "when signing in" do
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1
mail = deliveries[0]
- mail.body =~ /(http:\/\/.*(\/c\/(.*)))/
+ mail.body.to_s =~ /(http:\/\/.*(\/c\/(.*)))/
mail_url = $1
mail_path = $2
mail_token = $3
@@ -498,7 +498,7 @@ describe UserController, "when changing email address" do
mail.body.should include("confirm that you want to change")
mail.to.should == [ 'newbob@localhost' ]
- mail.body =~ /(http:\/\/.*(\/c\/(.*)))/
+ mail.body.to_s =~ /(http:\/\/.*(\/c\/(.*)))/
mail_url = $1
mail_path = $2
mail_token = $3