maxitest 1.1.3 → 1.1.4
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/maxitest/vendor/around.rb +1 -1
- data/lib/maxitest/vendor/testrbl.rb +12 -8
- data/lib/maxitest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ada2fcaf0961ecb335010364d543e9f3a74889b
|
4
|
+
data.tar.gz: cafe5159aa98f17961764b70c4c31ade8399acd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4bcb5740bd548b89314344a0a4049956c762a69a8bc6739d7e5b5957cfb2ff806f1b5333d61cc8289afebebfe2debb3ffbb599316c62c714e26cd7f9c246c3a
|
7
|
+
data.tar.gz: abecf17870b29c8303fdd42548c6898a29b65f68aa8ac0c1ffd68fb823ac3f9042fe9991f3b2aae7c877ac56cb08707a593f66c80a96f02e066859101cdf092e
|
@@ -29,7 +29,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
29
29
|
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/version.rb
|
30
30
|
# BEGIN generated by rake update, do not modify
|
31
31
|
module MinitestAround
|
32
|
-
VERSION = '0.3.
|
32
|
+
VERSION = '0.3.1'
|
33
33
|
end
|
34
34
|
#END generated by rake update, do not modify
|
35
35
|
|
@@ -148,18 +148,17 @@ module Maxitest
|
|
148
148
|
def self.test_pattern_from_match(method, test_name)
|
149
149
|
regex = Regexp.escape(test_name).gsub("\\ "," ").gsub(INTERPOLATION, ".*")
|
150
150
|
|
151
|
-
regex =
|
152
|
-
when "should"
|
153
|
-
optional_test_name = "(?:\(.*\))?"
|
154
|
-
"#{method} #{regex}\. #{optional_test_name}$"
|
155
|
-
when "describe"
|
156
|
-
"#{test_name}(::)?"
|
157
|
-
when "test"
|
151
|
+
regex = if method == "test"
|
158
152
|
# test "xxx -_ yyy"
|
159
153
|
# test-unit: "test: xxx -_ yyy"
|
160
154
|
# activesupport: "test_xxx_-__yyy"
|
161
155
|
"^test(: |_)#{regex.gsub(" ", ".")}$"
|
162
|
-
|
156
|
+
elsif method == "describe" || (method == "context" && !via_shoulda?)
|
157
|
+
"#{test_name}(::)?"
|
158
|
+
elsif method == "should" && via_shoulda?
|
159
|
+
optional_test_name = "(?:\(.*\))?"
|
160
|
+
"#{method} #{regex}\. #{optional_test_name}$"
|
161
|
+
elsif ["it", "should"].include?(method) # minitest aliases for shoulda
|
163
162
|
"#test_\\d+_#{test_name}$"
|
164
163
|
else
|
165
164
|
regex
|
@@ -167,6 +166,11 @@ module Maxitest
|
|
167
166
|
|
168
167
|
regex.gsub("'", ".")
|
169
168
|
end
|
169
|
+
|
170
|
+
def self.via_shoulda?
|
171
|
+
return @via_shoulda if defined?(@via_shoulda)
|
172
|
+
@via_shoulda = !File.exist?("Gemfile.lock") || File.read("Gemfile.lock").include?(" shoulda-context ")
|
173
|
+
end
|
170
174
|
end
|
171
175
|
end
|
172
176
|
#END generated by rake update, do not modify
|
data/lib/maxitest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maxitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|