Re: [rspec-users] Overriding Kernel#inspect just for tests

2011-04-11 Thread J. B. Rainsberger
On Fri, Apr 8, 2011 at 02:52, Stefan Kanev wrote: > Occasionally, I write specs that verify the order in which some ActiveRecord > objects are returned. For example, in a toy project I do: > > Reply.stub :per_page => 2 > topic.replies_on_page(1).should == [second, first] > > The spec out quickly

Re: [rspec-users] Overriding Kernel#inspect just for tests

2011-04-08 Thread Stefan Kanev
Ah, that's clever. Thanks. On Fri, Apr 8, 2011 at 3:43 PM, David Chelimsky wrote: > On Fri, Apr 8, 2011 at 1:52 AM, Stefan Kanev > wrote: > > Hi all. > > Occasionally, I write specs that verify the order in which some > ActiveRecord > > objects are returned. For example, in a toy project I do: >

Re: [rspec-users] Overriding Kernel#inspect just for tests

2011-04-08 Thread David Chelimsky
On Fri, Apr 8, 2011 at 1:52 AM, Stefan Kanev wrote: > Hi all. > Occasionally, I write specs that verify the order in which some ActiveRecord > objects are returned. For example, in a toy project I do: > > Reply.stub :per_page => 2 > topic.replies_on_page(1).should == [second, first] > > The spec o