I am trying to test with has_link? in my spec test, here is my test:
page.has_link?('next_page', {}).should == true
but, the test always fail, although the link with id ‘next_page’ dose exist!
the strange thing is that have_content always works fine, here is how I implement it:
page.should have_content("some text")
Can you help me please ? what I am missing here ?
EDIT
Here is the resulted link in the page:
<a id="next_page" href="javascript: void(0)" onclick="javascript: void(0)" style="color: #888888">Next</a>
I think you should do :
page.has_link? “next_page”
or
page.has_link? “next_page”, url_path