aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-04-15 08:57:43 +0200
committerYves Senn <yves.senn@gmail.com>2014-04-15 08:57:43 +0200
commit81678075f839b237dace340d244cdd439aea5d2f (patch)
tree85eda5491e3567b494e29537748d1fd920c98fc1 /actionpack/lib/action_dispatch/testing
parentab529c89c867e9775b2edcdbfb548f6ec3e15700 (diff)
parentce6f472f28715ad59be802db4280f99e517c4c39 (diff)
downloadrails-81678075f839b237dace340d244cdd439aea5d2f.tar.gz
rails-81678075f839b237dace340d244cdd439aea5d2f.tar.bz2
rails-81678075f839b237dace340d244cdd439aea5d2f.zip
Merge pull request #14728 from stomar/assertion-msg
Remove surplus period from assertion messages
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/selector.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
index 8a128427bf..12023e6f77 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -267,7 +267,7 @@ module ActionDispatch
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 @@ module ActionDispatch
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 @@ module ActionDispatch
# 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