minitest-extra-matchers 0.0.11 → 0.0.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd2c76fc3a0e645a43091ceec25b4f818dd2ee3
|
4
|
+
data.tar.gz: 390ae9fb542c49d74c323249b6b1df6d03d7720c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e499a3b11fad6c4528994a36cb1a6ac41822c79cfa0c370d4f18c7cc4acd335ac77c21bc9496a07a565b8e7d81dc5fac7b3f4023492db3088a375545028ea2a8
|
7
|
+
data.tar.gz: 49f9ff5f8d0d6a6a8dcac46d3c5f5bea3e1955655ac3f3c8eb3dedbc7fbd4e42252792e151795ca0bcab9d23c926dbf38d4a1a13aa736447edf2640c540d927c
|
@@ -2,13 +2,8 @@ module Minitest
|
|
2
2
|
module Extra
|
3
3
|
module Matchers
|
4
4
|
module DOM
|
5
|
-
|
6
|
-
|
7
|
-
infect_an_assertion :assert_dom_equal, :must_equal_dom
|
8
|
-
infect_an_assertion :assert_attribute_equal, :must_have_attribute,
|
9
|
-
:dont_flip
|
10
|
-
end
|
11
|
-
end
|
5
|
+
infect_an_assertion :assert_dom_equal, :must_equal_dom
|
6
|
+
infect_an_assertion :assert_attr_equal, :must_have_attr
|
12
7
|
|
13
8
|
def assert_dom_equal(expected, actual)
|
14
9
|
expected_dom = Nokogiri::HTML.fragment(expected).child
|
@@ -17,7 +12,7 @@ module Minitest
|
|
17
12
|
assert_equal expected_dom, actual_dom
|
18
13
|
end
|
19
14
|
|
20
|
-
def
|
15
|
+
def assert_attr_equal(value, element, name)
|
21
16
|
actual = Nokogiri::HTML.fragment(element).child.attr(name)
|
22
17
|
|
23
18
|
assert_equal value, actual
|
@@ -2,11 +2,7 @@ module Minitest
|
|
2
2
|
module Extra
|
3
3
|
module Matchers
|
4
4
|
module Received
|
5
|
-
|
6
|
-
base.class_eval do
|
7
|
-
infect_an_assertion :assert_sent, :must_receive, :dont_flip
|
8
|
-
end
|
9
|
-
end
|
5
|
+
infect_an_assertion :assert_sent, :must_receive, :dont_flip
|
10
6
|
|
11
7
|
def assert_sent(to, method)
|
12
8
|
assert_received to, &method
|