[mocha-developer] SslRequirements plugin and mocha
chrisjroos at gmail.com
Tue Jan 23 17:27:36 EST 2007
On 1/23/07, Zack Chandler <zackchandler at gmail.com> wrote:
> Hi. I'm loving mocha but have ran into a problem with using the mocha
> plugin with a project that has the SslRequirement plugin. It seems
> there is some conflict between the two? Any ideas?
> $ ruby test/functional/calendar_controller_test.rb
> `const_missing': uninitialized constant
> ApplicationController::SslRequirement (NameError)
> from /Users/zackchandler/dev/shasta/config/../app/controllers/application.rb:6
I've recreated the problem with Rails 1.2.1 and Mocha 0.4.0.
The problem can be traced to the require 'test_help' line in the
init.rb file in the mocha plugin. A very limited experiment seems to
indicate the it is safe to remove this line. Can I ask that you try
to remove it temporarily and see if your tests still pass
(particularly the tests that use mocha?) Hopefully, we'll be able to
look at the full implications of this tomorrow.
As an aside, you can recreate this problem without installing the
mocha plugin. Simply create a new folder (called anything you like, I
chose dummy_plugin) in vendor/plugins. Within that folder, add an
init.rb file containing the following line:
With this in place, you should see the error you mention.
Hope this makes sense/helps.
More information about the mocha-developer