On 27 May 2009, at 03:38, Julian L. wrote:
verification point into separate test case, but then it will double
or triple the overall execution time. Does RSpec support this?
Isn’t this usual behaviour?
Yeah I’m a little confused by the question (and David’s response) so
maybe I’ve misunderstood something. Normal RSpec test runs will catch
all the test failures and report them at the end of the run. I wonder
whether the OP is talking about a situation where the interaction with
the system takes a long time, so that using lots of examples of the
desired behaviour causes that interaction to be run several times
making the whole run very slow.
I also wonder whether he’s just thinking in the test/unit mindset,
which I see a lot, where you have examples like this
it "should do foo and bar" do
Here’s my normal RSpec flow:
it “should have done foo” do
it “should have done bar” do
if set_up_state and/or do_something_to_system_under_test take ages,
you could use a before(:all) block instead, but that comes with
obvious leaky state disadvantages.