Edward Ocampo-Gooding
2007-Aug-14 18:44 UTC
[rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
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 uploaded_data'' Avatar expected, got Avatar This only happens with that exact configuration; turning off drb will fix it, as will running ''rake spec'' instead. I saw something like this in Brian''s post here [http://rubyforge.org/pipermail/rspec-devel/2007-June/003032.html] but it''s a little strange that it only gets triggered in this exact setup. Any ideas why? Edward
aslak hellesoy
2007-Aug-14 19:20 UTC
[rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
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 > uploaded_data'' > 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? Aslak> I saw something like this in Brian''s post here > [http://rubyforge.org/pipermail/rspec-devel/2007-June/003032.html] but it''s a > little strange that it only gets triggered in this exact setup. > > Any ideas why? > > Edward > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Edward Ocampo-Gooding
2007-Aug-15 01:52 UTC
[rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
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 >> uploaded_data'' >> 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 Thanks, Edward