minitest-bang 1.1.0.beta → 1.1.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea4ee63404be924d6133aab08acd463921c03856
4
- data.tar.gz: c1f6123c3f2b89944dabc9adbd846e4a679177ba
3
+ metadata.gz: 3b45d74f628aff67b7741cd5994baec2bf01c766
4
+ data.tar.gz: e1bc0d0a81d586a4d13e6a8dc436baa562b33eab
5
5
  SHA512:
6
- metadata.gz: fdfdb293e730ae6a2c27d3e64bd8a7d0c0f74df5936dac514fa9f17098f2795c8cbd69e9248af853ed2071aec86c07e3cb04b715a4c9cad5024abd2e3ffea5e6
7
- data.tar.gz: 5fa6be9fca4b4bc91d8332cf40ed272af605318a382c9ecf09fa076c8e3131a58fcef2acb00c67700a447df18a4243694fa63b15f210bdfbde9e67a4b6d08325
6
+ metadata.gz: 0392905de693aa291e40c0100b9fc7af74dd4a2bdbff5ec9104a85e9b759bdfc296807045e272501046b3b8c8286f5f16514c176ba08ea5827fef0745ca672de
7
+ data.tar.gz: 491f2c68cd6d2173e322b776843527081eaa58b5eaa7993bd8f67c2a399ef31ed86ffa5d5baf3a56141478bee13a029d2bc285ff0750486faa1c24b07ea46c7d
@@ -5,7 +5,12 @@ module Minitest
5
5
  module Bang
6
6
  def before_setup
7
7
  super
8
- self.class.all_bangs.each(&method(:send))
8
+ self.class.bangs_from_parent_scope.each(&method(:send))
9
+ end
10
+
11
+ def after_setup
12
+ super
13
+ self.class.bangs.each(&method(:send))
9
14
  end
10
15
  end
11
16
 
@@ -9,21 +9,26 @@ module Minitest
9
9
  bangs << name
10
10
  end
11
11
 
12
+ def bangs
13
+ @bangs ||= Set.new
14
+ end
15
+
12
16
  def all_bangs
13
17
  return Set.new if @before_ran
14
18
  bangs + bangs_from_parent_scope
15
19
  end
16
20
 
17
- private
18
-
19
- def bangs
20
- @bangs ||= Set.new
21
+ def bangs_from_parent_scope
22
+ return Set.new unless defined? self.superclass.all_bangs
23
+ self.superclass.all_bangs
21
24
  end
22
25
 
26
+ private
27
+
23
28
  def before_with_bangs(_type=nil, &block)
24
29
  @before_ran = true
25
30
 
26
- before_bangs = Set.new(bangs + bangs_from_parent_scope)
31
+ before_bangs = Set.new(bangs)
27
32
  bangs.clear
28
33
  after_bangs = bangs
29
34
 
@@ -39,9 +44,5 @@ module Minitest
39
44
  alias_method :before_without_bangs, :before
40
45
  alias_method :before, :before_with_bangs
41
46
 
42
- def bangs_from_parent_scope
43
- return Set.new unless defined? self.superclass.all_bangs
44
- self.superclass.all_bangs
45
- end
46
47
  end
47
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-bang
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.beta
4
+ version: 1.1.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Stevens
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-03 00:00:00.000000000 Z
13
+ date: 2015-06-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake