Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Pavel Pokorný's Profile

GitHub User: Pajk

Comments by Pavel Pokorný

Avatar

Gread episode, thanks!

I have just one problem with this line:
mail.body.encoded.should match(edit_password_reset_path(user.password_reset_token))

It failed with:

ruby
1) UserMailer password_reset_email send user password reset url
     Failure/Error: mail.body.encoded.should match(edit_password_reset_path(user.password_reset_token))
     NameError:
       undefined local variable or method `controller' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x00000106264150>
     # (eval):10:in `edit_password_reset_path'

It looks like I cannot use paths in mailer spec. Im using
rails 3.0.9,
rspec (2.6.0)
rspec-core (2.6.4, 2.6.3)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)

Could somebody help me to deal with this?