[rspec-users] Is there a way to get an "around" hook for each spec file?

2011-09-07 Thread John Feminella
Is there a way to run an `around` block once for every spec *file* (not spec)? (I want to measure which files take the longest amount of time, count the number of specs in each file, and then report the average spec running time for that file.) ~ jf -- John Feminella Principal Consultant, BitsBuil

Re: [rspec-users] rspec testing inheritance

2011-09-07 Thread Matt Wynne
On 7 Sep 2011, at 07:53, Sidu Ponnappa wrote: > > On 7 September 2011 11:09, Justin Ko wrote: >> >> >> On Tue, Sep 6, 2011 at 9:40 PM, slavix wrote: >>> >>> Hello, >>> Is there any way to test model inheritance in spec? >>> >>> something like.. >>> it { ChildModel.should < ParentModel } >

[rspec-users] Warning (but not failing) if a method wasn't called?

2011-09-07 Thread John Feminella
Is there a way to warn but not fail if a particular method wasn't called? That is, I'm looking for something that's halfway between obj.stub(...) and obj.should_receive(...). I'm trying to do something like this: shared_context "with a stubbed geocoder" do before(:each) do @geocoding_client

Re: [rspec-users] Is there a way to get an "around" hook for each spec file?

2011-09-07 Thread David Chelimsky
On Sep 7, 2011, at 6:50 AM, John Feminella wrote: > Is there a way to run an `around` block once for every spec *file* > (not spec)? Not at this point, and I don't think it would be a slam dunk to add. > (I want to measure which files take the longest amount of > time, count the number of specs

Re: [rspec-users] rspec testing inheritance

2011-09-07 Thread David Chelimsky
On Sep 7, 2011, at 7:03 AM, Matt Wynne wrote: > On 7 Sep 2011, at 07:53, Sidu Ponnappa wrote: > >> On 7 September 2011 11:09, Justin Ko wrote: >>> >>> On Tue, Sep 6, 2011 at 9:40 PM, slavix wrote: Hello, Is there any way to test model inheritance in spec? something l

Re: [rspec-users] Warning (but not failing) if a method wasn't called?

2011-09-07 Thread Justin Ko
On Wed, Sep 7, 2011 at 6:08 AM, John Feminella wrote: > Is there a way to warn but not fail if a particular method wasn't > called? That is, I'm looking for something that's halfway between > obj.stub(...) and obj.should_receive(...). I'm trying to do something > like this: > > shared_context "wit

Re: [rspec-users] Is there a way to get an "around" hook for each spec file?

2011-09-07 Thread Justin Ko
On Wed, Sep 7, 2011 at 5:50 AM, John Feminella wrote: > Is there a way to run an `around` block once for every spec *file* > (not spec)? (I want to measure which files take the longest amount of > time, count the number of specs in each file, and then report the > average spec running time for tha

Re: [rspec-users] Warning (but not failing) if a method wasn't called?

2011-09-07 Thread David Chelimsky
On Sep 7, 2011, at 7:08 AM, John Feminella wrote: > Is there a way to warn but not fail if a particular method wasn't > called? That is, I'm looking for something that's halfway between > obj.stub(...) and obj.should_receive(...). I'm trying to do something > like this: > > shared_context "with a

Re: [rspec-users] Is there a way to get an "around" hook for each spec file?

2011-09-07 Thread John Feminella
> Why not just use the --profile option? Doesn't --profile only return the ten slowest examples? I have thousands of specs, so I need a little more data than that. ~ jf -- John Feminella Principal Consultant, BitsBuilder LI: http://www.linkedin.com/in/johnxf SO: http://stackoverflow.com/users/751