This project is archived and is in readonly mode.
Mocha is required by setup_and_teardown.rb in all environments and modes
Reported by Chad Humphries | June 12th, 2008 @ 04:57 PM
The following code snippet is where it happens. Mocha becomes available in all environments, and also in script/console, script/server, etc.
begin
require 'mocha'
base.alias_method_chain :run, :callbacks_and_mocha
rescue LoadError
base.alias_method_chain :run, :callbacks
end
This could cause other testing frameworks or even test/unit tests to encounter problems as mocha will be included along side whatever mocking framework the user actually is using. This doesn't seem to cause any issues currently, but it definitely should be cleaned up.
Comments and changes to this ticket
-
Jeremy Kemper June 12th, 2008 @ 05:43 PM
- Milestone set to 2.1.1
- State changed from new to open
- Assigned user set to Jeremy Kemper
True. We could gem 'mocha' instead and rescue Gem::LoadError instead.
-
Repository June 23rd, 2008 @ 04:56 AM
- State changed from open to resolved
(from [8636df7b5572b996cee0bfb59f9804825b3030d2]) Check for mocha gem without requiring the lib. [#403 state:resolved]
-
Repository June 23rd, 2008 @ 04:56 AM
(from [4d5ac3f3d2e1667971752c9a4e536de1a5bec364]) Check for mocha gem without requiring the lib. [#403 state:resolved]
-
Repository June 23rd, 2008 @ 08:39 AM
(from [642b0e95122c6f748ba0575e6dd3e2eccf34509c]) Revert "Check for mocha gem without requiring the lib. [#403 state:resolved]"
This reverts commit 8636df7b5572b996cee0bfb59f9804825b3030d2.
-
Repository June 23rd, 2008 @ 08:39 AM
(from [d7462ea36550bd59cfbcd7961f5870c49bcf8963]) Revert "Check for mocha gem without requiring the lib. [#403 state:resolved]"
This reverts commit 4d5ac3f3d2e1667971752c9a4e536de1a5bec364.
-
Jeremy Kemper June 23rd, 2008 @ 08:44 AM
- State changed from resolved to incomplete
Messes up the setup/teardown override. Since mocha isn't required before it's mixed in.
-
Jeremy Kemper June 23rd, 2008 @ 08:44 AM
- Milestone cleared.
-
John July 3rd, 2008 @ 02:14 AM
- Tag set to activesupport, bug, tests
This actually is causing problems transitioning our app up to 2.1, just mentioning it so this isn't just treated as a "tidy up" issue.
If I come up with a solution that isn't halfway hackish I'll submit a patch.
-
josh October 5th, 2008 @ 03:14 PM
- State changed from incomplete to wontfix
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Tags
Referenced by
- 2240 let users decide what mock framework to use https://rails.lighthouseapp.com/...