[rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
edward.og at gmail.com
Tue Aug 14 21:52:29 EDT 2007
aslak hellesoy wrote:
> On 8/14/07, Edward Ocampo-Gooding <edward.og at gmail.com> wrote:
>> Before I chalk this up as a bug and report it, I just want to make sure I'm not
>> doing something silly.
>> Running ZenTest's autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the
>> following failed test:
>> ActiveRecord::AssociationTypeMismatch in 'User should create an avatar with
>> Avatar expected, got Avatar
>> This only happens with that exact configuration; turning off drb will fix it, as
>> will running 'rake spec' instead.
> What if you run with drb *without* autotest? Does it pass the first
> time and fail the second time?
> If that's the case, it could have something to do with the reloading
> of AR classes. Have you tried with different versions of Rails?
After getting home and trying it out again on the same laptop, it looks like
when drb is enabled, now both 'rake spec' and autotest hang for about 60 seconds
and then finally run. (Running rake spec --trace shows that it's hanging on
"Execute spec" for a really long time.)
Is there some drb debugging flag I can turn on, or blow away some drb-related cache?
Oh, and yes, you're right; 'rake spec' looks like it's having problems with
reloading the class, as it works fine the first time, but on subsequent runs, it
fails with an ActiveRecord::AssociationTypeMismatch.
This is all on Rails 1.2.3
More information about the rspec-users