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: a7e223d8f462aaad7794d74b72f87a812d514224
4
- data.tar.gz: 5a491949a4c8c6d98a608812778f22d972d7bb63
3
+ metadata.gz: 8bd2c76fc3a0e645a43091ceec25b4f818dd2ee3
4
+ data.tar.gz: 390ae9fb542c49d74c323249b6b1df6d03d7720c
5
5
  SHA512:
6
- metadata.gz: 0622ea8374dea39dff94c1732e88430e18af8f9d4720231c37004d5e1cd5b9046a207266e7cd435a1043410a0eccb87fb7c41fa46709514342cb492f272dc48e
7
- data.tar.gz: 1202c11e110454902454d5e5a2cf0965e4cd8ddb76a10ac19ee03902a9ba9ebe16816b986e8148183d7bdf5a503b3b18d5d10c499b3bdb7311f8b9cf0751ddfa
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
- def self.included(base)
6
- base.class_eval do
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 assert_attribute_equal(element, name, value)
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
- def self.included(base)
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
@@ -1,7 +1,7 @@
1
1
  module Minitest
2
2
  module Extra
3
3
  module Matchers
4
- VERSION = '0.0.11'
4
+ VERSION = '0.0.12'
5
5
  end
6
6
  end
7
7
  end
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.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Łukasz Niemier"