> But a sophisticated test will make decisions in mid test.
Quis custodiet ipsos custodes? You'll need to write specs for the
logic in your specs then.

Best,
Sidu.
http://c42.in
http://blog.sidu.in

On 10 August 2011 04:53, Mike Jr <n00s...@comcast.net> wrote:
> As I understand it, RSpec runs in two passes.  The first pass reads
> your code and invokes factory methods to generate instances of example-
> group and example subclasses.  The second pass then invokes these
> generated instance to run your test.
>
> RSpec filters (via RSpec.configure) are set and operate during the
> first pass.  The determination if a particular describe or it block is
> to be skipped is determined before the first test is executed in the
> second pass.  Even if I were to use a lambda in the filter (see
> http://blog.davidchelimsky.net/2010/06/14/filtering-examples-in-rspec-2/
> ) this would execute in the first pass.
>
> This is well and good.  Why generate test code that will be skipped?
>
> 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.
>
> Or have I missed some existing feature? (Oh please be true!)
>
> --Thank you,
> --R.J. Ekim
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to