mrbrdo / theine

Rails preloader for JRuby (similar to Zeus, Spring and Spork)
MIT License
99 stars 10 forks source link

Theine causes ActiveRecord::AssociationTypeMismatch #20

Open ianks opened 9 years ago

ianks commented 9 years ago

When running my test suite through theine rspec, the test suit fails with a common issue that looks like this:

ActiveRecord::AssociationTypeMismatch:
  User(#14416) expected, got User(#14418)

This only happens when using FactoryGirl to build objects. The type of class that factory girl build does not seem to match the expected class. I am confirmed this issue does not happen on JRuby-9.0.1.0 without theine.

mrbrdo commented 9 years ago

Looks to me like something is causing your code to be reloaded. I have not tested with jruby 9k

joshsmoore commented 8 years ago

I have the same problem with rails 4.2 and jruby 1.7.19

mrbrdo commented 8 years ago

I am trying to get support for JRuby into spring: https://github.com/rails/spring/pull/449 Waiting on JRuby 9.0.5.0 to get released which should include some necessary features for that.