Hi,

I'm a current maintainer of Mocha <https://mochajs.org>, which (AFAIK) was 
inspired by RSpec.  I am not the *author *of Mocha; the author is long 
gone, or I'd ask him about this.

My question regards a paradigm which seems common to BDD-style test 
frameworks.  I assume that RSpec works similarly, but I apologize if I'm 
incorrect.

It's most easily illustrated with a pseudocode example (sorry, I'm 
unfamiliar with Ruby):

begin suite 'foo'

  begin test 'bar'
    print 1
  end test
  
  begin suite 'baz'

    begin test 'quux'
      print 2
    end test

    print 3

  end suite
end suite


In Mocha (and I assume RSpec), the following would be printed:

1
3
2


This is difficult for some users to reason about.  I'm unable to explain 
what this algorithm buys us, other than perhaps better control over 
disabling tests and suites.  Can anyone explain why it works as it does?

thanks
Chris

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/872f0ecb-4ca1-4440-bb3f-27e111c80d89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to