Skip to content

Conversation

@britishtea
Copy link
Contributor

Since commit f6b140c assert_raise started using the second argument of assert for error messages. The error message was always "got nil instead". The reason is that the local variable exception only has a value in case of success. In case of failure its value is nil.

This pull request adds a test for the error message of each assertion method (assert, assert_equal and assert_raise) and fixes assert_raise to construct the expected error message in case of failure.

Jip van Reijsen added 3 commits April 26, 2016 10:14
Since commit f6b140c assert_raise started using the second argument of assert
for error messages. The error message was always "got nil instead". The reason
is that the local variable "exception" only has a value in case of success. In
case of failure its value is nil.

This commit adds tests to catch the error and fixes assert_raise to construct
the expected error message in case of failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant