rails-dom-testing 1.0.6 → 1.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 724b5c435bae94b76380a61fac570c5092c3d81f
4
- data.tar.gz: 540c6659e6b2589084adedba5b712c94de84ac4e
3
+ metadata.gz: 030838e44422116efcf7be92a3d4b7ff1071a4e6
4
+ data.tar.gz: 3dffb18ee2b4f7eab1675863596589a3be7d750b
5
5
  SHA512:
6
- metadata.gz: fc1af6fd6f6b348867bed35bd3f01644085880958de07eb73964db9f4ce36ec2868a6e68602724db40893fac95f516f8dda7d07b82be8f6cc02761e54e47e46a
7
- data.tar.gz: e4d7320a4af4d767149ecb4e0f29753c913fe92fa0fd30253dfb0212b5968b5417062a2ffa682aae8da3745ab2ee37bfd89ef085747e2e3562378a6f245a0d28
6
+ metadata.gz: 0772ce107d6f5480bdf1006f06ef5345afe9001cc016c30e5d8a2cf38fd82eabfb4013e2f34c4ac1801d0fcc2b34543fb98c1e8ed34ba360e283ece3642e2b4b
7
+ data.tar.gz: 4408e6eb5a7202a2f1319ea21e09cfb7e9b4a35d3de764b9561ab660f08fe5eae874fb0c97ed54eb5ad96cb9948d8da9dff6f856f83427d4c0d4603387528edd
data/README.md CHANGED
@@ -61,8 +61,8 @@ The documentation in [selector_assertions.rb](https://github.com/kaspth/rails-do
61
61
  ## Read more
62
62
 
63
63
  Under the hood the doms are parsed with Nokogiri and you'll generally be working with these two classes:
64
- - [`Nokogiri::XML::Node`](http://nokogiri.org/Nokogiri/XML/Node.html)
65
- - [`Nokogiri::XML::NodeSet`](http://nokogiri.org/Nokogiri/XML/NodeSet.html)
64
+ - [`Nokogiri::XML::Node`](http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Node)
65
+ - [`Nokogiri::XML::NodeSet`](http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/NodeSet)
66
66
 
67
67
  Read more about Nokogiri:
68
68
  - [Nokogiri](http://nokogiri.org)
@@ -262,7 +262,7 @@ module Rails
262
262
  end
263
263
 
264
264
  private
265
- include CountDescripable
265
+ include CountDescribable
266
266
 
267
267
  def document_root_element
268
268
  raise NotImplementedError, 'Implementing document_root_element makes ' \
@@ -1,22 +1,32 @@
1
1
  require 'active_support/concern'
2
2
 
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
5
10
 
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
18
23
 
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
21
30
  end
31
+ end
22
32
  end
@@ -146,7 +146,7 @@ module Rails
146
146
 
147
147
  def html_scanner_document
148
148
  xml = @response.content_type =~ /xml$/
149
- @html_document ||= HTML::Document.new(@response.body, false, xml)
149
+ @html_scanner_document ||= HTML::Document.new(@response.body, false, xml)
150
150
  end
151
151
  end
152
152
  end
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Dom
3
3
  module Testing
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.7"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-dom-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Mendonça França
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-17 00:00:00.000000000 Z
12
+ date: 2015-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.4.5
148
+ rubygems_version: 2.4.7
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Dom and Selector assertions for Rails applications
@@ -154,3 +154,4 @@ test_files:
154
154
  - test/selector_assertions_test.rb
155
155
  - test/tag_assertions_test.rb
156
156
  - test/test_helper.rb
157
+ has_rdoc: