Re: [rspec-users] Mock with an attributes that has state
>
> On Wed, Jun 4, 2008 at 9:06 AM, Matthew Lins <[EMAIL PROTECTED]> wrote:
>> I realize I could do this differently and just do a should_receive on the
>> OrderItem, looking for '+=' or something, but that doe
I'm developing a rails application. I have an Order model that has_many
OrderItems.
I mocked the OrderItem model in my Order specs using mock_model. I thought
I should focus my specs on each model and always mock associated models.
In my Order model I need a way to merge OrderItems which have t
Thanks for all of the great replies!
This thread answered a lot of my questions.
-Matt
> From: David Chelimsky <[EMAIL PROTECTED]>
> Reply-To: rspec-users
> Date: Mon, 28 Apr 2008 01:17:17 -0500
> To: rspec-users
> Subject: Re: [rspec-users] BDD/Rails/Shoulda
>
>
> On Apr 24, 2008, at 5:57
This is a little off topic, but I use rSpec and I¹m starting to question the
quality of my specs. In my research and attempt to learn how to write
better specs, I¹ve came across a few things that I¹d like to discuss.
I¹m having more and more difficulty understanding BDD. The more I read and
the
On 12/4/07 2:53 PM, "Shane Mingins" <[EMAIL PROTECTED]> wrote:
> On 5/12/2007, at 9:43 AM, Matthew Lins wrote:
>
>> Hello,
>>
>> I'm running AutoTest with Rspec on a Rails application.
>>
>> Every 20 or so runs I get &q
Hello,
I'm running AutoTest with Rspec on a Rails application.
Every 20 or so runs I get "stack level too deep" on one particular
controller stub.
Ex.
controller.stub!(:login).and_return(true)
This particular line is in a before block of a certain describe block. The
strange thing is, every si
But, that should be okay, since my intent is not to test the associated
models. I have a separate spec file for those models.
On 11/14/07 3:27 PM, "Scott Taylor" <[EMAIL PROTECTED]> wrote:
>
> On Nov 14, 2007, at 4:08 PM, sinclair bain wrote:
>
>> Matthew,
>>
>> If your intent is to test the
Hello,
As I'm becoming more and more familiar with mocking/stubbing, I'm going back
to some of my model specs and revaluating how I wrote them.
I have certain models in which validation requires the presence of an
associated model, which itself needs to be valid(validates_presence_of and
validate
BTW...When I say, "this doesn't work"
I mean the spec fails on the mock, saying the method was never called. But,
indeed it was, I can verify it by the TrustCommerce logs.
On 11/13/07 2:23 PM, "Matthew Lins" <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I&
Hey guys,
I'll try to explain this without the model code at first, since there is so
much, but if need be, I'll pastie it.
I have an Order model that makes API calls to a payment
gateway(TrustCommerce) during validation(to verify the credit card
information). I'd like to stub this behavior to av
10 matches
Mail list logo