Re: [rspec-users] Does rspec support something like Assumptions in JUnit 4.4?

2009-06-01 Thread mortench
On Jun 1, 8:04 pm, Arthur Smith wrote: > I thought the point was we don't want the examples to be run at all, if > the condition is not met? Yes. >Though I'm wondering why not just handle > something like this with a stub (on System.getProperty in this case)? Because the examples need the info

Re: [rspec-users] Does rspec support something like Assumptions in JUnit 4.4?

2009-06-01 Thread mortench
Correction for last msg: before(:all) do @org_root_prop = java.lang.System.getProperty("root") # abort all examples and after action if condition is not meet: ensure_that !...@org_root_prop.nil? && @org_root_prop.strip.length>0 end /Morten

Re: [rspec-users] Does rspec support something like Assumptions in JUnit 4.4?

2009-06-01 Thread mortench
avid Chelimsky wrote: > On Mon, Jun 1, 2009 at 5:33 AM, mortench wrote: > > JUnit 4.4+ has a feature called assumptions and I am looking for > > something similar in rspec so that I can express that my examples > > require a specific environment variable to be specified for

[rspec-users] Does rspec support something like Assumptions in JUnit 4.4?

2009-06-01 Thread mortench
JUnit 4.4+ has a feature called assumptions and I am looking for something similar in rspec so that I can express that my examples require a specific environment variable to be specified for testing to make sense. About assumptions from the readme (http://junit.sourceforge.net/doc/ ReleaseNotes4.4

Re: [rspec-users] Options Hash explanation ?

2009-05-13 Thread mortench
On 13 Maj, 01:14, Randy Harmon wrote: > mortench wrote: > > The new rspec beta book and the rspec site mentions that it is > > possible to add a hash to "describe" and "it" constructs but very, > > very litle information about the particulars. > > &

Re: [rspec-users] Options Hash explanation ?

2009-05-13 Thread mortench
On 13 Maj, 07:28, David Chelimsky wrote: > You can access the group and example options from within an example: > > describe "group options hash", :defined_in => :group do >   it "is available in examples via self.class.options" do >     self.class.options[:defined_in].should == :group >   end > e

[rspec-users] Options Hash explanation ?

2009-05-12 Thread mortench
The new rspec beta book and the rspec site mentions that it is possible to add a hash to "describe" and "it" constructs but very, very litle information about the particulars. What can the options hash be used for and what should it be used for? F.x. I have some identical examples that I need to