我在写的地方用 rspec 进行了测试
before { visit edit_password_reset_path(user.password_reset_token) }
我运行相关的测试,在这里我得到了什么:
No route matches [GET] "/password_resets/edit"
为了理解为什么它不起作用,我想知道user.password_reset_token
.
运行测试时如何使该变量出现?
我在写的地方用 rspec 进行了测试
before { visit edit_password_reset_path(user.password_reset_token) }
我运行相关的测试,在这里我得到了什么:
No route matches [GET] "/password_resets/edit"
为了理解为什么它不起作用,我想知道user.password_reset_token
.
运行测试时如何使该变量出现?