On Tue, Feb 2, 2010 at 19:00, Frank Lakatos m...@franklakatos.com wrote:
Hi guys, been following for about 3 weeks, first question -
This might help a little: http://bit.ly/ONpXE
To bring things back to Rails, I use mock_model whenever I want to
design controller behavior without relying on
On 3 Feb 2010, at 11:35, J. B. Rainsberger wrote:
I find this rule of thumb helpful: stub unless you're certain to want
to verify this time that the client invoke the server correctly, and
never, never mock multiple methods at once.
Right, because the mock (should_receive) is an assertion,
On Wed, Feb 3, 2010 at 8:18 AM, Matt Wynne m...@mattwynne.net wrote:
On 3 Feb 2010, at 11:35, J. B. Rainsberger wrote:
I find this rule of thumb helpful: stub unless you're certain to want
to verify this time that the client invoke the server correctly, and
never, never mock multiple methods
Ok, so these ideas seem kind of natural to me, which is nice:
mock_models being used to mock non-tested models
stub for queries and/or well-tested methods, should_receives for commands
While reading over Dave Astlels, I kind of got concerned because of
something he states that I feel I'm
On Wed, Feb 3, 2010 at 8:52 AM, m...@franklakatos.com wrote:
Ok, so these ideas seem kind of natural to me, which is nice:
mock_models being used to mock non-tested models
stub for queries and/or well-tested methods, should_receives for commands
While reading over Dave Astlels, I kind of
To say thank you for all your constuctive feedback would not be
enough; all these insights are really helping me to get the provebial
it.
Dave, I completely agree that the mock_model(ActiveRecord) was
bizzare, but my specs kept failing because @projects was to receive
.build, and it
On Wed, Feb 3, 2010 at 2:07 PM, m...@franklakatos.com wrote:
I absolutely love the idea of encapsulated the daisy chained calls
(c_u.comp.project) into a controller methods so all i gotta do is stub that
out.
Oooh, I hate that one :)
You're adding lots of small methods that actually don't
2010/2/3 Nicolás Sanguinetti godf...@gmail.com:
On Wed, Feb 3, 2010 at 2:07 PM, m...@franklakatos.com wrote:
I absolutely love the idea of encapsulated the daisy chained calls
(c_u.comp.project) into a controller methods so all i gotta do is stub that
out.
Oooh, I hate that one :)
You're
Hi guys, been following for about 3 weeks, first question -
I've been spending the last couple of months learning RSpec and
Cucumber and I'm just finally starting to see the big picture, at
least I think I am. But I've got some questions I was hoping you guys
can clear up. I'm sure this
Hello Frank,
From my understanding these are the roles of should_receive and stub.
should_receive checks to make sure that a method or a property is called. To
this you can specify the arguments that it gets called (.with()), what it
returns (.and_return) and how many times this happens (.once,
On Tue, Feb 2, 2010 at 9:53 PM, Andrei Erdoss erd...@gmail.com wrote:
Hello Frank,
From my understanding these are the roles of should_receive and stub.
should_receive checks to make sure that a method or a property is called. To
this you can specify the arguments that it gets called
11 matches
Mail list logo