I have this code:
context "Visiting the users #index page." do
before(:each) { visit users_path }
subject { page }
pending('iii') { should have_no_css('table#users') }
pending { should have content('You have reached this page due to a permiss
ions error’) }
It results in a couple of pendings, e.g.
Managing Users Given a practitioner logged in. Visiting the users #index page.
# No reason given
# ./spec/requests/role_users_spec.rb:78
Managing Users Given a practitioner logged in. Visiting the users #index page.
# No reason given
# ./spec/requests/role_users_spec.rb:79
How can I get those pendings to have text instead of “no reason given”
I’ve tried putting some text after the word pending and before the block but that didn’t help – it appeared at the end of the line – but I still have all the “No reason given”s.
pendingitself is a method, and the normal use case is something like this:That will output
So, when you want to use the short form, like
Then to mark as pending you have a couple of options:
But to get the pending with a message, you should do:
That’ll give you the output