Skip to content

Commit 8e94151

Browse files
committed
Merge pull request #36 from tgxworld/fix_incorrect_spelling
Fix incorrect spelling.
2 parents 8baa9d5 + 6f3b666 commit 8e94151

File tree

2 files changed

+27
-17
lines changed

2 files changed

+27
-17
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def assert_select_email(&block)
262262
end
263263

264264
private
265-
include CountDescripable
265+
include CountDescribable
266266

267267
def document_root_element
268268
raise NotImplementedError, 'Implementing document_root_element makes ' \
Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
require 'active_support/concern'
22

3-
module CountDescripable
4-
extend ActiveSupport::Concern
3+
module Rails
4+
module Dom
5+
module Testing
6+
module Assertions
7+
module SelectorAssertions
8+
module CountDescribable
9+
extend ActiveSupport::Concern
510

6-
private
7-
def count_description(min, max, count) #:nodoc:
8-
if min && max && (max != min)
9-
"between #{min} and #{max} elements"
10-
elsif min && max && max == min && count
11-
"exactly #{count} #{pluralize_element(min)}"
12-
elsif min && !(min == 1 && max == 1)
13-
"at least #{min} #{pluralize_element(min)}"
14-
elsif max
15-
"at most #{max} #{pluralize_element(max)}"
16-
end
17-
end
11+
private
12+
def count_description(min, max, count) #:nodoc:
13+
if min && max && (max != min)
14+
"between #{min} and #{max} elements"
15+
elsif min && max && max == min && count
16+
"exactly #{count} #{pluralize_element(min)}"
17+
elsif min && !(min == 1 && max == 1)
18+
"at least #{min} #{pluralize_element(min)}"
19+
elsif max
20+
"at most #{max} #{pluralize_element(max)}"
21+
end
22+
end
1823

19-
def pluralize_element(quantity)
20-
quantity == 1 ? 'element' : 'elements'
24+
def pluralize_element(quantity)
25+
quantity == 1 ? 'element' : 'elements'
26+
end
27+
end
28+
end
29+
end
2130
end
31+
end
2232
end

0 commit comments

Comments
 (0)