Re: [rspec-users] Factories vs. stubs/mocks

2010-09-03 Thread J. B. Rainsberger
On Mon, Aug 30, 2010 at 14:09, Rob Biedenharn > And THAT is the problem with using mocks (or stubs) for this.  You run the > very real risk of specifying the implementation details in the structure of > the spec/test.  There is a problem when you've limited the refactoring that > can be done withou

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-31 Thread Matt Wynne
On 30 Aug 2010, at 18:32, Justin Ko wrote: > > > On Aug 30, 1:09 pm, Rob Biedenharn > wrote: >> On Aug 30, 2010, at 12:54 PM, Brennon Bortz wrote: >> >> >> >> >> >>> On 30 Aug 2010, at 17:17, Justin Ko wrote: On Aug 30, 11:59 am, Brennon Bortz wrote: > I am, as usual, assigning

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Justin Ko
On Aug 30, 1:32 pm, Justin Ko wrote: > On Aug 30, 1:09 pm, Rob Biedenharn > wrote: > > > > > > > On Aug 30, 2010, at 12:54 PM, Brennon Bortz wrote: > > > > On 30 Aug 2010, at 17:17, Justin Ko wrote: > > >> On Aug 30, 11:59 am, Brennon Bortz wrote: > > >>> I am, as usual, assigning an instance

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Justin Ko
On Aug 30, 1:09 pm, Rob Biedenharn wrote: > On Aug 30, 2010, at 12:54 PM, Brennon Bortz wrote: > > > > > > > On 30 Aug 2010, at 17:17, Justin Ko wrote: > >> On Aug 30, 11:59 am, Brennon Bortz wrote: > >>> I am, as usual, assigning an instance variable in a controller's   > >>> index action to f

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Rob Biedenharn
On Aug 30, 2010, at 12:54 PM, Brennon Bortz wrote: On 30 Aug 2010, at 17:17, Justin Ko wrote: On Aug 30, 11:59 am, Brennon Bortz wrote: I am, as usual, assigning an instance variable in a controller's index action to find all instances of a model in the database. I want to write a spec tha

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Justin Ko
On Aug 30, 12:54 pm, Brennon Bortz wrote: > On 30 Aug 2010, at 17:17, Justin Ko wrote: > > > > > > > > > On Aug 30, 11:59 am, Brennon Bortz wrote: > >> I am, as usual, assigning an instance variable in a controller's index > >> action to find all instances of a model in the database.  I want t

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Brennon Bortz
On 30 Aug 2010, at 17:17, Justin Ko wrote: > > > On Aug 30, 11:59 am, Brennon Bortz wrote: >> I am, as usual, assigning an instance variable in a controller's index >> action to find all instances of a model in the database. I want to write a >> spec that checks that this variable is assigne

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Justin Ko
On Aug 30, 11:59 am, Brennon Bortz wrote: > I am, as usual, assigning an instance variable in a controller's index action > to find all instances of a model in the database.  I want to write a spec > that checks that this variable is assigned correctly.  I can do: > > it "should provide a coll

[rspec-users] Factories vs. stubs/mocks

2010-08-30 Thread Brennon Bortz
I am, as usual, assigning an instance variable in a controller's index action to find all instances of a model in the database. I want to write a spec that checks that this variable is assigned correctly. I can do: it "should provide a collection of widgets in @widgets" do widget = Widge