minitest-extra-matchers 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minitest/extra/matchers/dom.rb +20 -0
- data/lib/minitest/extra/matchers/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 506cd092fe38e70044634ee37955c55ab9363a99
|
4
|
+
data.tar.gz: 4430b8ee1f6ee10e76633bfac49064bd1458e043
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b70a957fef4183ac965da3d1487d5fb65c2709ee5ab551b4d3db178857a2d31d7f307c63a31e52c287c02cb40bbff5b0f3d64b442a80b7d9d35c43570c9a333a
|
7
|
+
data.tar.gz: ca4e74c316273712645ecbcb0ad52c158eda6b537d27d33479095e3c7e922e6c6854594968e6eac5a1c44127a5c8c75f231eb9f899f81b53e78e946a43eeb652
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Minitest
|
2
|
+
module Extra
|
3
|
+
module Matchers
|
4
|
+
module DOM
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
infect_an_assertion :assert_dom_equal, :must_equal_dom
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def assert_dom_equal(expected, actual)
|
12
|
+
expected_dom = HTML::Document.new(expected).root
|
13
|
+
actual_dom = HTML::Document.new(actual).root
|
14
|
+
|
15
|
+
assert_equal expected_dom, actual_dom
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-extra-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Łukasz Niemier"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
69
|
- lib/minitest/extra/matchers.rb
|
70
|
+
- lib/minitest/extra/matchers/dom.rb
|
70
71
|
- lib/minitest/extra/matchers/pending.rb
|
71
72
|
- lib/minitest/extra/matchers/received.rb
|
72
73
|
- lib/minitest/extra/matchers/subject.rb
|
@@ -92,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
93
|
version: '0'
|
93
94
|
requirements: []
|
94
95
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.4.2
|
96
97
|
signing_key:
|
97
98
|
specification_version: 4
|
98
99
|
summary: Extra matchers for MiniTest::Spec that simplify specs
|