diff options
author | Adam Cozzette <acozzette@google.com> | 2016-11-23 08:45:20 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2016-11-23 08:57:27 -0800 |
commit | 65479cb7b1f99ab957da68abce17feb68a9e1cf0 (patch) | |
tree | ade4793ef3873589b6db8abc5287232ab50c7709 /ruby/tests | |
parent | 259dd7e842dd3a848a1094a42c05610e8a31dcbb (diff) | |
download | protobuf-65479cb7b1f99ab957da68abce17feb68a9e1cf0.tar.gz protobuf-65479cb7b1f99ab957da68abce17feb68a9e1cf0.tar.bz2 protobuf-65479cb7b1f99ab957da68abce17feb68a9e1cf0.zip |
Fixed Ruby tests for JRuby 1.7
This makes a couple of changes to fix the tests for JRuby 1.7:
- Avoid using assert_false since that assertion seems not to exist in
older versions
- Disable a test related to respond_to? for JRuby. It's hard to tell
what is going wrong here but it looks like probably a JRuby bug that
has been fixed in more recent versions.
Diffstat (limited to 'ruby/tests')
-rw-r--r-- | ruby/tests/basic.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ruby/tests/basic.rb b/ruby/tests/basic.rb index 967ff81f..e0dba8bd 100644 --- a/ruby/tests/basic.rb +++ b/ruby/tests/basic.rb @@ -1183,13 +1183,15 @@ module BasicTest end def test_comparison_with_arbitrary_object - assert_false MapMessage.new == nil + assert MapMessage.new != nil end def test_respond_to + # This test fails with JRuby 1.7.23, likely because of an old JRuby bug. + return if RUBY_PLATFORM == "java" msg = MapMessage.new assert msg.respond_to?(:map_string_int32) - assert_false msg.respond_to?(:bacon) + assert !msg.respond_to?(:bacon) end end end |