Skip to content

Commit

Permalink
Merge pull request #329 from Shopify/Alex/test-exception-attr
Browse files Browse the repository at this point in the history
Add test coverage for `UnexpectedMultipleSigsError#node`
  • Loading branch information
amomchilov authored Jul 24, 2024
2 parents 5880d8e + a8196f7 commit 23aa795
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/rbi/rewriters/attr_to_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def test_raise_on_multiple_sigs

e = assert_raises(RBI::UnexpectedMultipleSigsError) { rbi.replace_attributes_with_methods! }

assert_equal(["Integer", "String"], e.node.sigs.map(&:return_type))
# This is just to test the message rendering. Please don't depend on the exact message content.
assert_equal(e.message, <<~MSG)
This declaration cannot have more than one sig.
Expand Down

0 comments on commit 23aa795

Please sign in to comment.