minitest-have_tag 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 8e6765086a201c83b35a4db5dd168e16b9acc43a59f476158cb177d8e04c0ba4
4
- data.tar.gz: e420ffe80bc11785ca5e43908d108846b2a8def9597408fe1e79eaeba8bebe43
3
+ metadata.gz: 623e8d0312c42b0f58a82525ab9d7b436ecc75b28cbb4005bf270cbbd7fadec2
4
+ data.tar.gz: 45a0fd0e3d9be6586430323535372144fc564b828004665f39a1a2290c30d22f
5
5
  SHA512:
6
- metadata.gz: 84499970abfc1f78f04672d37f9b09891c93940da5851f9f83c5667b99e02d984fa279450002f23835272bbb4229245b3905a1d797e3026192650896f8ff92cf
7
- data.tar.gz: 3f873c514502661fbc00f7793a2a41ac2a761ccd4fa2e0152454bb46ffe39ae1dc06ba1ceef7c8ed1dc5120828106232e7300ae37a4019f29445b8d9f9ac2732
6
+ metadata.gz: 344472efb8b3de1dfde5eb5863002f91d29f5d03fc797aa3d0150edc21434bc5f70ba0270a25583dc4a9ca1854e3cf5adbd580d5a6755801b35781d1d3dd00e3
7
+ data.tar.gz: 3e6d0e53d2617f9893fc86bc772ceb6acd823b170cfdf1cdde1768adf31e4b1893dfe95602ea248269d37ec08e5ca404964b4d615419c3733864b326a5d01b0f
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Minitest
4
4
  module HaveTag
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -162,10 +162,11 @@ module Minitest::Assertions
162
162
  # @return [Boolean] True if contents match exactly, false otherwise
163
163
  #
164
164
  def check_string_contents(res, contents, msg)
165
- if res.inner_html == contents
165
+ if res.any? { |tag| tag.inner_html == contents }
166
166
  true
167
167
  else
168
- msg << " with contents [#{contents.inspect}], but the tag content is [#{res.inner_html}]"
168
+ msg << " with contents [#{contents.inspect}], but the tags content found "
169
+ msg << "is [#{res.map(&:inner_html).join(', ')}]"
169
170
  false
170
171
  end
171
172
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-have_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kematzy