On Jun 13, 2011, at 9:44 PM, S Ahmed wrote:
> On Mon, Jun 13, 2011 at 9:37 PM, David Chelimsky wrote:
> On Jun 13, 2011, at 8:29 PM, S Ahmed wrote:
>
> "How to mock when there seems to be a requirement for chained mocked calls?"
>
> There is no such requirement unless you are imposing it by you
This is a method in my Model that I am writing a test for correct.
There are allot of if/else clauses in the method, and i want to make sure
certain things are called so I want to write expectations for it.
Not sure why you don't recommend such a thing? (chained expecations)
On Mon, Jun 13, 201
On Jun 13, 2011, at 8:29 PM, S Ahmed wrote:
"How to mock when there seems to be a requirement for chained mocked calls?"
There is no such requirement unless you are imposing it by your own design
decisions.
> I want to mock the following:
>
> MyModel.where(".").last
Why do you want to do
I want to mock the following:
MyModel.where(".").last
I tried:
MyModel.should_receive(:where).and_return(nil)
but this of course doesn't match the expectation since the call to .last was
not mapped in the mock code.
How can I do this?
___
rspec-u
On Jun 12, 2011, at 10:52 AM, Patrick J. Collins wrote:
>> What do you mean by "on target"? Are you asking if the implementations are
>> the same, or similar? Or are you asking if attest meets the same goals as
>> RSpec?
>
> More specifically, I meant the way he implements describe blocks and the