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 +4 -4
- data/lib/minitest/have_tag/version.rb +1 -1
- data/lib/minitest/have_tag.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623e8d0312c42b0f58a82525ab9d7b436ecc75b28cbb4005bf270cbbd7fadec2
|
4
|
+
data.tar.gz: 45a0fd0e3d9be6586430323535372144fc564b828004665f39a1a2290c30d22f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 344472efb8b3de1dfde5eb5863002f91d29f5d03fc797aa3d0150edc21434bc5f70ba0270a25583dc4a9ca1854e3cf5adbd580d5a6755801b35781d1d3dd00e3
|
7
|
+
data.tar.gz: 3e6d0e53d2617f9893fc86bc772ceb6acd823b170cfdf1cdde1768adf31e4b1893dfe95602ea248269d37ec08e5ca404964b4d615419c3733864b326a5d01b0f
|
data/lib/minitest/have_tag.rb
CHANGED
@@ -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
|
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
|