-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class reloading for Rails projects #29
Comments
I would definitely be interested in accepting something like that (as long as it works on projects that are not rails, too). But I don't think I have any insight to how it should be done. Nonetheless, let me know if I can help with questions. |
Yes, I definitely intend to make it continue working as is for all rails versions and non-rails projects. I'm finding that it may be useful to integrate with spork when it's available too. A typically Rails project that uses spork has in the spec_helper.rb a |
👍 this would be really awesome |
I'll see if I can put together a pull request today with what I have |
This isn't working properly. Some modification after my initial tests is causing class unloading not to work. A method that gets deleted is not undefined for subsequent test runs. |
Right now I'm working on a module that will kick in for rails projects that will use
ActionDispatch::Reloader
to reload rails classes the right way (like it does in development environment) rather than usingload
. Usingload
can be problematic for several reasons. Removing methods and classes in the code does not cause them to be undefined. Using RSpec 1 and maybe other test frameworks, each test run makes new duplicate copies of each spec, and the old copies still fail if they originally were. In general, it's not idempotent. This patch I'm working on this morning should fix that for Rails >= 3.1 projects.Any thoughts on this?
The text was updated successfully, but these errors were encountered: