I have a RSpec test that keeps failing.
subject { page }
visit user_path(user)
it { should have_link('Settings', href: edit_user_path(user)) }
But when I load the page myself I can see that the link is working well. Any ideas ? No spelling mistake as well.
Possible to see the page that RSpec loaded in the test?
Your
visit user_path(user)isn’t executing in the right context.Try either:
Or:
If you would like to see the html, you can use a
save_and_open_pagestatement.