[rspec-users] Test execution time filtering

Stefan Kanev stefan.kanev at gmail.com
Wed Aug 17 04:05:51 EDT 2011

On Wed, Aug 10, 2011 at 2:23 AM, Mike Jr <n00spam at comcast.net> wrote:

> But a sophisticated test will make decisions in mid test.  If a
> certain test condition occurs, set a singleton hash and then have
> later tests condition their processing on that hash.  In my tests,
> these if statements are within the it blocks so that they execute
> during the second pass.
> It sure would be less clutter if the describe and it statements
> supported a filter that is evaluated in the second pass.

I am not sure if I understand you, but if I do, conventional wisdom suggests
that having if statements in your tests is a very bad idea. You might want
to check out this article:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110817/0b4ef2a6/attachment.html>

More information about the rspec-users mailing list