New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass assert_dom_equal message arg to underlying assertion #11751
Conversation
@@ -7,20 +7,20 @@ module DomAssertions | |||
# | |||
# # assert that the referenced method generates the appropriate HTML string | |||
# assert_dom_equal '<a href="http://www.example.com">Apples</a>', link_to("Apples", "http://www.example.com") | |||
def assert_dom_equal(expected, actual, message = "") | |||
def assert_dom_equal(expected, actual, message = nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference of changing this to nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert_equal
defaults the failure message argument to nil, and if we're going to pass it along, I thought it would be better to keep the same default so we're never affected by implementation changes in assert_equal
.
A test case would be great |
Could you add a CHANGELOG entry? |
@rafaelfranca Agreed, but I didn't see any tests for |
#assert_dom_equal and #assert_dom_not_equal both take a "failure" message argument, but this argument was not utilized.
@rafaelfranca No problem. Changelog entry added and squashed. |
Pass assert_dom_equal message arg to underlying assertion
Pass assert_dom_equal message arg to underlying assertion Conflicts: actionpack/CHANGELOG.md
#assert_dom_equal
and#assert_dom_not_equal
both take a "failure"message
argument, but this argument was not utilized.