rails-dom-testing 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,28 +0,0 @@
1
- module Rails
2
- module Dom
3
- module Testing
4
- module Assertions
5
- module SelectorAssertions
6
- module CountDescribable
7
- private
8
- def count_description(min, max, count) #:nodoc:
9
- if min && max && (max != min)
10
- "between #{min} and #{max} elements"
11
- elsif min && max && max == min && count
12
- "exactly #{count} #{pluralize_element(min)}"
13
- elsif min && !(min == 1 && max == 1)
14
- "at least #{min} #{pluralize_element(min)}"
15
- elsif max
16
- "at most #{max} #{pluralize_element(max)}"
17
- end
18
- end
19
-
20
- def pluralize_element(quantity)
21
- quantity == 1 ? 'element' : 'elements'
22
- end
23
- end
24
- end
25
- end
26
- end
27
- end
28
- end