2009/9/9 Lb2007 <[email protected]>:
> After installation of Mocha (0.9.7), running "script/spec spec"
> results in a "`const_missing': uninitialized constant
> Test::Unit::TestResult::TestResultFailureSupport (NameError)" error.
> (As shown here; http://codepad.org/mTqztjwt )
> I'm running Ruby 1.8.6 with Rails 2.3.4 on Windows, rspec (-rails)
> 1.2.8 (1.2.7.1), Test::Unit 2.0.3
>
> As suggested roughly on 
> http://stackoverflow.com/questions/1145318/getting-uninitialized-cons
> , I've added config.gem 'test-unit', :lib => 'test/unit'" to my
> environments/test.rb file at the very top. Doing so does resolve the
> trace being printed, however, no output is generated at all when
> running "script/spec spec" again. Removing the line brings back the
> trace, but logically does not resolve the issue. ( Relevant Test::Unit
> code is shown on http://codepad.org/bg7BlS7F )
>
> What other workarounds could I give a shot? Googling doesnt seem to
> bring up alternative solutions sadly.

I don't know anything about the RSpec side of things, but the thing
that changed in Mocha >= 0.9.6 was that previously Mocha had itself
loaded Test::Unit whereas now it expects you to load Test::Unit
yourself before you then load Mocha.

How are you loading Mocha? If you are loading it with a config.gem
statement after the 'test-unit' one, then this should be ok and I
would guess the problem may lie in the integration with RSpec.

Regards, James.
----
http://blog.floehopper.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to