[rspec-devel] [ rspec-Feature Requests-5663 ] context_setup

noreply at rubyforge.org noreply at rubyforge.org
Fri Jan 19 08:59:19 EST 2007


Feature Requests item #5663, was opened at 2006-09-07 12:51
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5663&group_id=797

Category: None
Group: None
>Status: Closed
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: Nobody (None)
Summary: context_setup

Initial Comment:
There should be a context_setup (or similar construct) that only executes once within a given context. In fact, perhaps there could be such a thing with wider scope.

The primary reason for this request has to do w/ using selenium. When you run the examples in ~/vendor/selenium, it fires up the browser once per spec. It would be nice to do that only once per run.

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-19 13:59

Message:
This was fixed in revision 1323. The Patch (https://rubyforge.org/tracker/index.php?func=detail&aid=7345&group_id=797&atid=3151) got closed, but this one didn't. Closing it now.

----------------------------------------------------------------------

Comment By: Bob Cotton (bcotton)
Date: 2006-12-18 18:41

Message:
Patch submitted in patch tracker:
https://rubyforge.org/tracker/index.php?func=detail&aid=7345&group_id=797&atid=3151

----------------------------------------------------------------------

Comment By: Bob Cotton (bcotton)
Date: 2006-12-05 12:40

Message:
This is a useful feature for defining acceptanct testing, where mocking is not an option.

Additionally it would be great to allow instance variables from the context_setup to be visisble to all the specs.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-09-12 21:12

Message:
Implementing this feature would potentially lead people to write specs that violate the principle of independent specs. Specs with sideffects.

I've checked in a patchfile that deomstrates how to achieve a browser to be started only once.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5663&group_id=797


More information about the rspec-devel mailing list