This project is archived and is in readonly mode.
rails/info causes frameworks that are not already loaded to be (partially?) loaded
-
Graeme Mathieson
Got the tests sussed, I think. Attached is a new patch, with tests this time.
-
Frederick Cheung
Cool, I've been bitten by this one (also with new relic and a databaseless app). Not someone with a checkout of rails handy, but isn't removing the ActiveRecord constant going to mess up other tests. Perhaps you could put it back afterwards (in an ensure) or mock out the call to const_defined ?
Also you should rebase down to a single patch.
-
Bill
+1 We also had this problem in NewRelic. As a side effect of collecting Rails information we broke apps that did not include the AR framework.
The patch looks good to me. I thought maybe you could get the frameworks list from the configuration object and use that as a test instead, but there are probably tradeoffs between both approaches I'm not aware of. Just a thought.
-
Graeme Mathieson
@Frederick: Removing ActiveRecord doesn't seem to be messing up other tests -- I've run the full Rails test suite without issue. Thanks for the squashing tip -- I've attached a new version of the patch which is flattened.
@Bill Unfortunately, you can't get the frameworks list from the configuration object because it splits out action controller into action view & action pack, which is not what Rails::Info wants to see.
-
Rohit Arondekar
- State changed from new to stale
- Importance changed from to
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
