cutest-cj 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cutest.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3527302d4782fea67835bf2734e84571e83f20a4
|
4
|
+
data.tar.gz: 5c8f67fa0980aa072b2964cf1b4e0c1954e82a72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f60ddf513b24ab684d291e1d6a6b2af821d8474740c0d0a887e1706d3eb645c54a2e499e64dea47657db824245346371a21c6d5006ab9040126ffbca2e5b06
|
7
|
+
data.tar.gz: a248d12f5acaa6440684ae2fa29d46d96f8f01c8061016cf73bab1e81ba59feb37bbbccfd6a2e7d01e8a97df2cb43ff9f59333ea85caf92a8ac7ad30cb69c6b6
|
data/lib/cutest.rb
CHANGED
@@ -5,7 +5,7 @@ class Cutest
|
|
5
5
|
autoload :Database, 'database'
|
6
6
|
|
7
7
|
unless defined?(VERSION)
|
8
|
-
VERSION = "1.3.
|
8
|
+
VERSION = "1.3.3"
|
9
9
|
FILTER = %r[/(ruby|jruby|rbx)[-/]([0-9\.])+]
|
10
10
|
CACHE = Hash.new { |h, k| h[k] = File.readlines(k) }
|
11
11
|
end
|
@@ -155,6 +155,8 @@ module Kernel
|
|
155
155
|
# Create a class where the block will be evaluated. Recommended to improve
|
156
156
|
# isolation between tests.
|
157
157
|
def scope(name = nil, &block)
|
158
|
+
cutest[:current_scope] = name
|
159
|
+
|
158
160
|
if !cutest[:scope] || cutest[:scope] == name
|
159
161
|
puts "\033[93mScope: \033[0m#{cutest[:scope]}"
|
160
162
|
puts ""
|
@@ -202,6 +204,8 @@ module Kernel
|
|
202
204
|
def test(name = nil, &block)
|
203
205
|
cutest[:test] = name
|
204
206
|
|
207
|
+
return if cutest[:current_scope] != cutest[:scope]
|
208
|
+
|
205
209
|
if !cutest[:only] || cutest[:only] == name
|
206
210
|
print ' '
|
207
211
|
time_taken = Benchmark.measure do
|