From: Alex Chaffee Date: 2012-07-07T01:45:52+09:00 Subject: Re: Spork doesn't load 'some' models On Fri, Jul 6, 2012 at 3:10 AM, Andrea Reginato wrote: > Let me explain. I've making unit test to my models. When I apply changes > to the spec files they are correctly reloaded and new changes are seen. > All fine. When I apply changes to the model file they are not reloaded > and the tests runs with the version initially loaded (when spork > starts), not the changed one (the last one I would need). This cause me > to restart spork every time, loosing its benefices and my patience. One thought: sometimes AR model instances (and their classes) are cached or memoized, and with spork this can lead to behavior that doesn't show up if your test process gets to exit. That would mean that even if you are reloading the class, the old instance is pointing to the old class. How exactly are you observing that the class didn't reload? Also, you might get a better audience on an rspec or spork forum. Finally, if you're using spork+guard+rails you should also use guard-spork or rerun to restart spork itself when certain config files change. See https://github.com/guard/guard-spork or https://github.com/alexch/rerun for instructions. - A -- Alex Chaffee - alex@stinky.com http://alexchaffee.com http://twitter.com/alexch