cutest-cj 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cutest.rb +9 -13
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aff43f337711fbf6687a02829297b2c5277a81e4
4
- data.tar.gz: ae1db45084b3f8748a6d1cb892eadf9a1572c727
3
+ metadata.gz: 88f48ff40fc449bbb26e705c04a23abdedde6ffd
4
+ data.tar.gz: 8bd1a02a25192c32c686d56ec8d0bc7251f760e6
5
5
  SHA512:
6
- metadata.gz: b588cb46f93c7986a0c41698c86d90292da0e5a231b222a28059c46c910ea30a41c2c2aa8d6a06f88c0fefc234505a45a0c845829bc056d68a4cbb3bfc42b606
7
- data.tar.gz: b12cfb3c633bc97a24d5f74b043ae77754bd5a47a21c5070de1057e072a4c6b55bae1e3d8664a8dc07ead0d7cab09b26cc6bc780639e367cac20619b33cf9908
6
+ metadata.gz: d6e6d7f9525e17aadcfa67ea980275db3de98e140ee4aeaf8d0e9dab90030049ca22048358710f5c65fe4228f721ab4e565209784363930940e546b742157cb9
7
+ data.tar.gz: e1f855ef47eca8b08419bfd28399959fe8611010658658d82dc454078a07ad0c5a4c0d4330184838766f15432bb962a5d26ca6863b705e082d313db13f6c49aa
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.4"
8
+ VERSION = "1.3.5"
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,8 +155,6 @@ 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
-
160
158
  if !cutest[:scope] || cutest[:scope] == name
161
159
  puts "\033[93mScope: \033[0m#{cutest[:scope]}"
162
160
  puts ""
@@ -204,17 +202,15 @@ module Kernel
204
202
  def test(name = nil, &block)
205
203
  cutest[:test] = name
206
204
 
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"
205
+ if !cutest[:only] || cutest[:only] == name
206
+ print ' '
207
+ time_taken = Benchmark.measure do
208
+ prepare.each { |blk| blk.call }
209
+ block.call(setup && setup.call)
217
210
  end
211
+ puts ''
212
+ puts " \033[93mTest: \033[0m#{cutest[:test]} \033[32m✔\033[0m"
213
+ puts "\e[94m#{time_taken}\033[0m"
218
214
  end
219
215
 
220
216
  cutest[:test] = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cutest-cj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Janowski