"conditionally pending examples" in rspec 3.x?

19 views
Skip to first unread message

Al

unread,
Apr 14, 2016, 5:04:17 PM4/14/16
to rspec, jas...@hotmail.com
I work on the OWASP Railsgoat project that is stuck at rspec 2.99.0 since
"conditionally pending examples" were removed and
they are functional to the project. Here is an example

 * pending(:if => verifying_fixed?) { find('#submit_button').value.should == 'RailsGoat h4x0r3d' }

You can see the code on GitHub at https://github.com/OWASP/railsgoat .
How do I make it 3.x compatible?

I know that "should" format will need to be upgraded to "expect" format.

Thanks,
Al

Myron Marston

unread,
Apr 14, 2016, 5:07:06 PM4/14/16
to rs...@googlegroups.com, jas...@hotmail.com

On RSpec 3 it’s far simpler:

pending if verifying_fixed?
find('#submit_button').value.should == 'RailsGoat h4x0r3d'

I believe transpec helps with this kind of thing. Have you tried following our upgrade guide?

http://rspec.info/upgrading-from-rspec-2/



--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/4a2f66a7-367b-4277-a8c1-8bead38a6ad1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Al

unread,
Apr 14, 2016, 5:30:55 PM4/14/16
to rspec, jas...@hotmail.com
THANKS for the quick response and it worked as expect.
Reply all
Reply to author
Forward
0 new messages