Jim Deville wrote:
>>
>
> Just wondering about your usage of constraints. We ran into this
> issue recently and came to the conclusion that unless profiling shows
> an issue, use AR to enforce referential integrity. You might be able
> to get by using :dependent => :destroy, or one of the o
David Chelimsky wrote:
> On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
>> Tilmann Singer wrote:
>>> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
What's rake doing differently?
>>> rake spec isn't doing anything fundamentally different, but the order
>>> the specs are run is propably
As people have pointed out, using DB foreign key constraints within
rails can be a nightmare when it comes to fixtures. In the past when I
have used DB constraints I have always disabled the constraints when
loading the fixtures so it wouldn't be an issue. The way I did it was
the following:
On Aug 27, 2007, at 8:08 AM, David Chelimsky wrote:
> On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
>> Tilmann Singer wrote:
>>> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
What's rake doing differently?
>>>
>>> rake spec isn't doing anything fundamentally different, but the
>>>
On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote:
> Tilmann Singer wrote:
> > * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
> >> What's rake doing differently?
> >
> > rake spec isn't doing anything fundamentally different, but the order
> > the specs are run is propably randomly different fro
Tilmann Singer wrote:
> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
>> What's rake doing differently?
>
> rake spec isn't doing anything fundamentally different, but the order
> the specs are run is propably randomly different from when you run
> them with spec so they happen to pass in one
* Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]:
> I've got a spec that loads a fixture in the "before" block. This works
> fine running scripts/spec, but when I run rake spec instead, I get:
>
> ActiveRecord::StatementInvalid in 'User in fixture :quentin with an IM
> service but no IM name s
I've got a spec that loads a fixture in the "before" block. This works
fine running scripts/spec, but when I run rake spec instead, I get:
ActiveRecord::StatementInvalid in 'User in fixture :quentin with an IM
service but no IM name should be invalid'
Mysql::Error: Cannot delete or update a par