cutest-cj 1.3.3 → 1.3.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/cutest.rb +11 -11
- 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: aff43f337711fbf6687a02829297b2c5277a81e4
|
|
4
|
+
data.tar.gz: ae1db45084b3f8748a6d1cb892eadf9a1572c727
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b588cb46f93c7986a0c41698c86d90292da0e5a231b222a28059c46c910ea30a41c2c2aa8d6a06f88c0fefc234505a45a0c845829bc056d68a4cbb3bfc42b606
|
|
7
|
+
data.tar.gz: b12cfb3c633bc97a24d5f74b043ae77754bd5a47a21c5070de1057e072a4c6b55bae1e3d8664a8dc07ead0d7cab09b26cc6bc780639e367cac20619b33cf9908
|
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.4"
|
|
9
9
|
FILTER = %r[/(ruby|jruby|rbx)[-/]([0-9\.])+]
|
|
10
10
|
CACHE = Hash.new { |h, k| h[k] = File.readlines(k) }
|
|
11
11
|
end
|
|
@@ -204,17 +204,17 @@ module Kernel
|
|
|
204
204
|
def test(name = nil, &block)
|
|
205
205
|
cutest[:test] = name
|
|
206
206
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
207
|
+
if !cutest[:scope] || cutest[:scope] == cutest[:current_scope]
|
|
208
|
+
if !cutest[:only] || cutest[:only] == name
|
|
209
|
+
print ' '
|
|
210
|
+
time_taken = Benchmark.measure do
|
|
211
|
+
prepare.each { |blk| blk.call }
|
|
212
|
+
block.call(setup && setup.call)
|
|
213
|
+
end
|
|
214
|
+
puts ''
|
|
215
|
+
puts " \033[93mTest: \033[0m#{cutest[:test]} \033[32m✔\033[0m"
|
|
216
|
+
puts "\e[94m#{time_taken}\033[0m"
|
|
214
217
|
end
|
|
215
|
-
puts ''
|
|
216
|
-
puts " \033[93mTest: \033[0m#{cutest[:test]} \033[32m✔\033[0m"
|
|
217
|
-
puts "\e[94m#{time_taken}\033[0m"
|
|
218
218
|
end
|
|
219
219
|
|
|
220
220
|
cutest[:test] = nil
|