Avoid loading application.rb twice?
Reported by Jon | March 15th, 2008 @ 09:41 PM
Another problem I ran into while migrating from TestCase to RSpec was that my application.rb was getting loaded twice, causing all sorts of fun problems with some alias_method_chains I had in there.
The first time it was loaded was from Rails' test_help.rb, which has a "require_dependency 'application'". Then RSpec's rails.rb loads it with "require 'application'".
While I perhaps need to be more careful about monkeypatching in application.rb, is there any reason not to replace 'require' with 'require_dependency' in rails.rb?
Comments and changes to this ticket
-

-
Matt Patterson July 10th, 2008 @ 06:47 PM
- → Tag changed from to duplicate
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Behaviour Driven Development for Ruby.
