On Wed, Aug 27, 2008 at 2:34 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>> Here's the basic deal:
>>
>> Model.find(1).equal?(Model.find(1))
>> => false
>>
>> AR does not cache objects, so when you ask it for what you *think*
>> might the same object twice, you get different ones.
>
> I thought as mu
On 27 Aug 2008, at 13:26, David Chelimsky wrote:
On Wed, Aug 27, 2008 at 7:22 AM, Zach Dennis
<[EMAIL PROTECTED]> wrote:
On Wed, Aug 27, 2008 at 3:34 AM, Matt Wynne <[EMAIL PROTECTED]>
wrote:
Here's the basic deal:
Model.find(1).equal?(Model.find(1))
=> false
AR does not cache objects, so
On Wed, Aug 27, 2008 at 7:22 AM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 27, 2008 at 3:34 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>>> Here's the basic deal:
>>>
>>> Model.find(1).equal?(Model.find(1))
>>> => false
>>>
>>> AR does not cache objects, so when you ask it for what you *th
On Wed, Aug 27, 2008 at 3:34 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>> Here's the basic deal:
>>
>> Model.find(1).equal?(Model.find(1))
>> => false
>>
>> AR does not cache objects, so when you ask it for what you *think*
>> might the same object twice, you get different ones.
>
> I thought as mu
Here's the basic deal:
Model.find(1).equal?(Model.find(1))
=> false
AR does not cache objects, so when you ask it for what you *think*
might the same object twice, you get different ones.
I thought as much... So does AR just cache the object's attributes
instead and construct them on the fly
On Tue, Aug 26, 2008 at 10:03 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Tue, Aug 26, 2008 at 8:51 PM, Mark Wilden <[EMAIL PROTECTED]> wrote:
>> On Tue, Aug 26, 2008 at 5:01 PM, David Chelimsky <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> @target_comment = stub_model(Target)
>>> @target.stub!(
On Tue, Aug 26, 2008 at 8:51 PM, Mark Wilden <[EMAIL PROTECTED]> wrote:
> On Tue, Aug 26, 2008 at 5:01 PM, David Chelimsky <[EMAIL PROTECTED]>
> wrote:
>
>>
>> @target_comment = stub_model(Target)
>> @target.stub!(:comments).and_return([EMAIL PROTECTED])
>
> That's what we do - what would the drawb
On Tue, Aug 26, 2008 at 5:01 PM, David Chelimsky <[EMAIL PROTECTED]>wrote:
> @target_comment = stub_model(Target)
> @target.stub!(:comments).and_return([EMAIL PROTECTED])
>
That's what we do - what would the drawbacks be?
///ark
___
rspec-users mailin
On Tue, Aug 26, 2008 at 1:34 PM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have what I thought was quite a simple requirement but something to do
> with the way ActiveRecord's associations work is making it quite puzzling.
> I guess I can sum it up with this failing test:
> before
Hi all,
I have what I thought was quite a simple requirement but something to
do with the way ActiveRecord's associations work is making it quite
puzzling.
I guess I can sum it up with this failing test:
before(:each) do
@source_comment = @source.comments.create(:user_id
10 matches
Mail list logo