Skip to content

Commit 6391d4f

Browse files
author
Rafael Mendonça França
committed
pluralize will clash with Action View helper
1 parent 6fc60c9 commit 6391d4f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/rails/dom/testing/assertions/selector_assertions/count_describable.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ def count_description(min, max, count) #:nodoc:
88
if min && max && (max != min)
99
"between #{min} and #{max} elements"
1010
elsif min && max && max == min && count
11-
"exactly #{count} #{pluralize(min)}"
11+
"exactly #{count} #{pluralize_element(min)}"
1212
elsif min && !(min == 1 && max == 1)
13-
"at least #{min} #{pluralize(min)}"
13+
"at least #{min} #{pluralize_element(min)}"
1414
elsif max
15-
"at most #{max} #{pluralize(max)}"
15+
"at most #{max} #{pluralize_element(max)}"
1616
end
1717
end
1818

19-
def pluralize(quantity)
19+
def pluralize_element(quantity)
2020
quantity == 1 ? 'element' : 'elements'
2121
end
2222
end

lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ def extract_equality_tests
105105
end
106106
comparisons
107107
end
108-
end
108+
end

0 commit comments

Comments
 (0)