0

我在写的地方用 rspec 进行了测试

before { visit edit_password_reset_path(user.password_reset_token) }

我运行相关的测试,在这里我得到了什么:

No route matches [GET] "/password_resets/edit"

为了理解为什么它不起作用,我想知道user.password_reset_token.

运行测试时如何使该变量出现?

4

1 回答 1

0

简单地说:

before do 
    puts user.password_reset_token
    visit edit_password_reset_path(user.password_reset_token) 
end
于 2013-10-02T06:52:58.397 回答