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(“[email protected]”)
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 ?