I am using Capybara with Rspec and have the following code on my page:
<div class="pagination pagination-centered"> <ul> // ... <li class="last"> <a href="/en/articles?page=2">Last ยป</a> </li> </ul> </div>
I want to check the query that there is a div with the class "pagination pagination". I tried this:
it "should have pagination" do page.should have_selector('div#pagination pagination-centered') end
And this:
it "should have pagination" do page.should have_selector('div', :class => 'pagination pagination-centered') end
And nobody is working. How to solve a problem?
Exire source share