I want to compare the expected path and current path to justify whether the test is passed within Minitest.
I found the method Capybara::SessionMatchers#assert_current_path. I guess this method can fulfill my requirement.
But when I wrote:
page.assert_current_path()
In my test, the error showed: no #assert_current_path method
I've seen the Capybara::Session
has included the Capybara::SessionMatchers
. I'm confused of why I cannot call the #assert_current_path
method.
Does Capybara have the functionality to compare current path and expected path? coz use page content to justify the result is not stable for me.