I tam trying to generate a RESTful route from inside a mailer testing
spec, but I get an undefined method ...
I wrote the following code
require File.dirname(__FILE__) + ''/../spec_helper''
describe "Password Reset Instructions Email" do
include EmailSpec::Helpers
include EmailSpec::Matchers
include ActionController::UrlWriter
fixtures :users
@user =
User.find_by_email("john-QZmI/2vgwZVWk0Htik3J/w@public.gmane.org")
debugger
default_url_options[:host] = ''mycoolsite.com''
@password_reset_link = edit_password_reset_url
(@user.perishable_token)
...
:
but when debugging : edit_password_reset_url(@user.perishable_token)
it raises :
NoMethodError Exception: undefined method `edit_password_reset_url''
for Spec::Rails::Example::ModelExampleGroup::Subclass_1:Class
which is strange ....
@user.perishable_token => "quQOoHuCpcueewwL1Ps6" is defined..
did I missed any additional include ?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.