Browse files

Remove surplus period from assertion messages

  • Loading branch information...
1 parent 47d9321 commit 8c81c9c423c0b463637976d5f00df760e2e733e1 @stomar stomar committed Apr 13, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_dispatch/testing/assertions/selector.rb
View
6 actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -267,7 +267,7 @@ def assert_select(*args, &block)
text.strip! unless NO_STRIP.include?(match.name)
text.sub!(/\A\n/, '') if match.name == "textarea"
unless match_with.is_a?(Regexp) ? (text =~ match_with) : (text == match_with.to_s)
- content_mismatch ||= sprintf("<%s> expected but was\n<%s>.", match_with, text)
+ content_mismatch ||= sprintf("<%s> expected but was\n<%s>", match_with, text)
true
end
end
@@ -276,7 +276,7 @@ def assert_select(*args, &block)
html = match.children.map(&:to_s).join
html.strip! unless NO_STRIP.include?(match.name)
unless match_with.is_a?(Regexp) ? (html =~ match_with) : (html == match_with.to_s)
- content_mismatch ||= sprintf("<%s> expected but was\n<%s>.", match_with, html)
+ content_mismatch ||= sprintf("<%s> expected but was\n<%s>", match_with, html)
true
end
end
@@ -289,7 +289,7 @@ def assert_select(*args, &block)
# FIXME: minitest provides messaging when we use assert_operator,
# so is this custom message really needed?
- message = message || %(Expected #{count_description(min, max, count)} matching "#{selector.to_s}", found #{matches.size}.)
+ message = message || %(Expected #{count_description(min, max, count)} matching "#{selector.to_s}", found #{matches.size})
if count
assert_equal count, matches.size, message
else

0 comments on commit 8c81c9c

Please sign in to comment.