Wednesday, 15 May 2013

ruby on rails - undefined local variable or method `new_password_reset' -



ruby on rails - undefined local variable or method `new_password_reset' -

describe "passwordresets" before(:each) visit new_password_reset end "should contain title" page.should have_selector("title", text: "password reset") end end

failure/error: visit new_password_reset nameerror: undefined local variable or method `new_password_reset' #

when rake routes in terminal, below.

new_password_reset /password_resets/new(.:format) password_resets#new

why getting undefined local variable when run tests though route present.

either specify path straight like

visit '/password-reset'

or specify path method 'new_password_reset_path' , not 'new_password_reset'

visit new_password_reset_path

ruby-on-rails ruby ruby-on-rails-4

No comments:

Post a Comment