I am working with Capybara right now and I have a issue I was not able to resolve: I am logging into a page and I want to check, whether the login was successful. So I have the following code:
within(:id,'user_dropdown') do
expect(find('.name')).to have_content 'test'
end
But with doing this, I get the following error:
undefined method `expect' for #<Object:0x007fc39328ab78>
I think it has something to do, that expect is not available in the scope inside within. But how can I do this else?
Already thank you!
Aucun commentaire:
Enregistrer un commentaire