Skip to content

Commit

Permalink
Fixed Ruby tests for JRuby 1.7
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acozzette committed Nov 23, 2016
1 parent 259dd7e commit 65479cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ruby/tests/basic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1183,13 +1183,15 @@ def test_json_maps
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

0 comments on commit 65479cb

Please sign in to comment.