This project is archived and is in readonly mode.
Installation Of MiniUnit Causes Test To Fail
-
Ken Collins
Sorry for the bad formatting. Let me try that again. Note, you have to have the MiniUnit gem installed for this and the rails test cases in the link above to fail.
require 'rubygems' # gem 'mocha', '>= 0.9.3' require 'mocha' require 'test/unit' class TestFailing < Test::Unit::TestCase Assertion = MiniTest::Assertion def test_raise assert_raise(Assertion) { flunk } end end # Loaded suite /Users/kencollins/Desktop/test_failing # Started # F # Finished in 0.007939 seconds. # # 1) Failure: # test_raise(TestFailing) # method test_raise in test_failing.rb at line 11 # method __send__ in test_case_adapter.rb at line 69 # method run in test_case_adapter.rb at line 69 # <MiniTest::Assertion> exception expected but was # Class: <Test::Unit::AssertionFailedError> # Message: <"Flunked."> # ---Backtrace--- # /Users/kencollins/Desktop/test_failing.rb:11:in `test_raise' # /Users/kencollins/Desktop/test_failing.rb:11:in `test_raise' # /opt/local/lib/ruby/gems/1.8/gems/mocha-0.9.5/lib/mocha/test_case_adapter.rb:69:in `__send__' # /opt/local/lib/ruby/gems/1.8/gems/mocha-0.9.5/lib/mocha/test_case_adapter.rb:69:in `run' # --------------- # # 1 tests, 1 assertions, 1 failures, 0 errors -
James Mead
Hopefully this commit [1] resolves the Mocha aspects of this problem. Let me know if not.
Thanks, James.
-
Ken Collins
Well it does fix it but this commit in Mocha...
http://github.com/floehopper/moc...
... breaks active support since it calls on Mocha::TestCaseAdapter::AssertionCounter. I'll upload a patch for active support to work with the upcoming Mocha code org.
-
Pratik
- Assigned user set to Jeremy Kemper
-
Repository
- State changed from new to committed
(from [4b4e7caffa361a1a3317586d8f498b4ba353adba]) The latest trunk of Mocha > 0.9.5 which addresses issue with MiniUnit compatibility uses namespaced integration classes.
[#2060 Installation Of MiniUnit Causes Test To Fail state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
-
August Lilleaas
Do you need some particular version of mocha to be able to run the tests now? I'm experiencing something very similar (http://pastie.org/417598) on the latest edge. Using mocha 0.9.5, via "gem1.9 install mocha".
-
Ken Collins
This can be marked invalid. It is moot under the release of 1.9.1 and rails 2.3.2.
