Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

6 Tests fail on Ruby 1.9.3 #41

Closed
bkabrda opened this Issue · 7 comments

3 participants

@bkabrda

Hi,
6 tests fail for me on Ruby 1.9.3:
1) Failure:
test_should_stub_private_method_and_leave_it_unchanged_after_test(StubClassMethodDefinedOnModuleTest) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-mocha-0.10.0-1.fc16.x86_64/usr/share/gems/gems/mocha-0.10.0/test/acceptance/stub_class_method_defined_on_module_test.rb:66]:
Snapshot has changed: {:added=>[#Class:#Class:0x0000000156b570#my_class_method (private)], :removed=>[]}

2) Failure:
test_should_stub_protected_method_and_leave_it_unchanged_after_test(StubClassMethodDefinedOnModuleTest) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-mocha-0.10.0-1.fc16.x86_64/usr/share/gems/gems/mocha-0.10.0/test/acceptance/stub_class_method_defined_on_module_test.rb:46]:
Snapshot has changed: {:added=>[#Class:#Class:0x000000014fc4e0#my_class_method (protected)], :removed=>[]}

3) Failure:
test_should_stub_public_method_and_leave_it_unchanged_after_test(StubClassMethodDefinedOnModuleTest) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-mocha-0.10.0-1.fc16.x86_64/usr/share/gems/gems/mocha-0.10.0/test/acceptance/stub_class_method_defined_on_module_test.rb:26]:
Snapshot has changed: {:added=>[#Class:#Class:0x00000000a89be8#my_class_method (public)], :removed=>[]}

4) Failure:
test_should_stub_private_method_and_leave_it_unchanged_after_test(StubClassMethodDefinedOnSuperclassTest) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-mocha-0.10.0-1.fc16.x86_64/usr/share/gems/gems/mocha-0.10.0/test/acceptance/stub_class_method_defined_on_superclass_test.rb:66]:
Snapshot has changed: {:added=>[#Class:#Class:0x0000000153bd98#my_class_method (private)], :removed=>[]}

5) Failure:
test_should_stub_protected_method_and_leave_it_unchanged_after_test(StubClassMethodDefinedOnSuperclassTest) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-mocha-0.10.0-1.fc16.x86_64/usr/share/gems/gems/mocha-0.10.0/test/acceptance/stub_class_method_defined_on_superclass_test.rb:46]:
Snapshot has changed: {:added=>[#Class:#Class:0x000000009ceb68#my_class_method (protected)], :removed=>[]}

6) Failure:
test_should_stub_public_method_and_leave_it_unchanged_after_test(StubClassMethodDefinedOnSuperclassTest) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-mocha-0.10.0-1.fc16.x86_64/usr/share/gems/gems/mocha-0.10.0/test/acceptance/stub_class_method_defined_on_superclass_test.rb:26]:
Snapshot has changed: {:added=>[#Class:#Class:0x000000014fac08#my_class_method (public)], :removed=>[]}

mocha release 0.10.0
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

Thank you :)

@floehopper
Owner

I'm aware of this problem - I just haven't had time to fix it. I'm pretty sure mocha itself should work properly in Ruby 1.9.3 - I think the problem is the extra tests I added in mocha which use introspection are failing because introspection itself doesn't work in Ruby 1.9.3.

@floehopper floehopper referenced this issue from a commit
@floehopper floehopper Avoid a bunch of warnings in Ruby 1.9.
    warning: assigned but unused variable - foo

There are still the 6 test failures mentioned in #41 which I suspect are
due to the introspection gem not being Ruby 1.9-compatible.
dfb5b59
@floehopper
Owner

Further investigation revealed that these test failures were legitimate and not due to problems with the introspection gem. I believe they may well be related to #47 and #74.

@floehopper
Owner

I believe this issue should be resolved in the latest revision (4d3e2bb) of Mocha. Please close the issue if you are happy with the resolution.

@voxik
Finished tests in 0.390990s, 1731.5030 tests/s, 2222.5644 assertions/s.
677 tests, 869 assertions, 0 failures, 0 errors, 0 skips

Thank you. Is the release imminent?

@floehopper
Owner

Thanks. Yes. I hope to release within the next day or two.

@floehopper
Owner

Hi Vít. Just to let you know I released v0.11.0 a couple of days ago, but a Ruby 1.8.7 regression crept in, so I have yanked it and released v0.11.1 this morning. I hope that helps. Cheers, James.

@voxik

Thank you. 0.11.0 works just fine for me with R193. I'll test 0.11.1 later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.