On Wed, Aug 10, 2011 at 2:23 AM, Mike Jr <n00s...@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:

http://xunitpatterns.com/Conditional%20Test%20Logic.html
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to