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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cutest.rb +5 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ecf8439cdde875bfb7236921ce6f4b3fd36fb30
4
- data.tar.gz: ad1e526906eea6dea8c3553255b851d896148987
3
+ metadata.gz: 3527302d4782fea67835bf2734e84571e83f20a4
4
+ data.tar.gz: 5c8f67fa0980aa072b2964cf1b4e0c1954e82a72
5
5
  SHA512:
6
- metadata.gz: 4c0177446b5e531aa4fd4867955e889ba6eef0930cb0de531531af4d4ea26b405f06a7bc0b8e47497698a16e54e85dd49ec97bd476a47efe84fbb2966ab6b499
7
- data.tar.gz: 0850f67b7c8e5e1af3cdfc41567f97bac80e7bc44bd735e4b6f107c999e666bf3dbdc0b12265736d032798b4f0fce6c3b0f0b383437afcefdb8adeaabe0bb58c
6
+ metadata.gz: 25f60ddf513b24ab684d291e1d6a6b2af821d8474740c0d0a887e1706d3eb645c54a2e499e64dea47657db824245346371a21c6d5006ab9040126ffbca2e5b06
7
+ data.tar.gz: a248d12f5acaa6440684ae2fa29d46d96f8f01c8061016cf73bab1e81ba59feb37bbbccfd6a2e7d01e8a97df2cb43ff9f59333ea85caf92a8ac7ad30cb69c6b6
@@ -5,7 +5,7 @@ class Cutest
5
5
  autoload :Database, 'database'
6
6
 
7
7
  unless defined?(VERSION)
8
- VERSION = "1.3.2"
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
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.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Janowski