minitest-extra-matchers 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5b749ec718a10b4038a921197d03cf0d4481a1a
|
4
|
+
data.tar.gz: 6b9576c4caedd4943a53e0cc15d24a39847edbca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4061fed01eb293a0b6d5da74ddda14c18cd0db07a6996fcbb35b552d733cdf316ed9e1bdf908d2fbb46bdd6e55846c526664d2d8d4d48739583c7181b43a5907
|
7
|
+
data.tar.gz: 22246bba14591bb81251644ffd2429dc90d62b0f5d443a048caadd3bcd1e73937b7d80b66279f128e8f8086d92eebe370e576ebb355cba0fa43699e5d545a95e
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'equivalent-xml'
|
2
|
+
|
1
3
|
module Minitest
|
2
4
|
module Extra
|
3
5
|
module Matchers
|
@@ -7,11 +9,14 @@ module Minitest
|
|
7
9
|
Object.infect_an_assertion :assert_attr_equal, :must_have_attr
|
8
10
|
end
|
9
11
|
|
10
|
-
def assert_dom_equal(expected, actual)
|
11
|
-
expected_dom = Nokogiri::HTML.fragment(expected)
|
12
|
-
actual_dom = Nokogiri::HTML.fragment(actual)
|
12
|
+
def assert_dom_equal(expected, actual, opts = {})
|
13
|
+
expected_dom = Nokogiri::HTML.fragment(expected)
|
14
|
+
actual_dom = Nokogiri::HTML.fragment(actual)
|
15
|
+
|
16
|
+
assert(EquivalentXml.equivalent?(actual, expected, opts),
|
17
|
+
['expected:', expected_dom.to_s,
|
18
|
+
'actual:', actual_dom.to_s].join("\n"))
|
13
19
|
|
14
|
-
assert_equal expected_dom, actual_dom
|
15
20
|
end
|
16
21
|
|
17
22
|
def assert_attr_equal(value, element, name)
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_dependency 'minitest', '>= 4.0'
|
23
|
-
spec.add_dependency '
|
23
|
+
spec.add_dependency 'equivalent-xml'
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.5"
|
26
26
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Łukasz Niemier"
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: equivalent-xml
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|