On 26 August 2011 18:45, Scott <[email protected]> wrote:
> It still feels a bit too close to testing the implementation of the method
> than I would like
Yep. I'm not sure of a better way to work around the paid scope.
I have been finding that liberal use of let allows me to put any
"required but you'd rather not have to" stubs that are a little bit
implementation aware (such as the paid stub in my gist) into a before
step very early on in the spec and what is left in each case is just
1) varying inputs (via let) and
2) outputs (via it { should })
that can be expanded rapidly and mixed together in combinations of
context blocks, without much extra stubbing/mocking.
I hope that makes sense. Happy to explain with more examples if it helps.
--
Gregory McIntyre
--
You received this message because you are subscribed to the Google Groups "Ruby
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-oceania?hl=en.