minitest-hooks 1.2.0 → 1.3.0

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: f627ec4c18d23a6411e5ca743c1c26ddfc0b7d7c
4
- data.tar.gz: bab6646941a54c118f04121ece54b4f21453ed13
3
+ metadata.gz: 678da317b529ac1cf071fd42f4abd5d325ccfb55
4
+ data.tar.gz: 2462e95a886cc806fe5fd14caa1157ab19ce9efe
5
5
  SHA512:
6
- metadata.gz: 1b6c79f2546ad32cbeb5b8245a335e762528bfe5b1b2b47b7fddad10908543dbe23f839ab82927f38a7d2c68bc9da330a14b36b025d5a1c142b400c4789bcee0
7
- data.tar.gz: d1d67e7620a1faff10d1c1ad104bf0feec27176f3e2cf81ac5f74dd7d2fafdbd667606dde1d06a0ab39d3275d80aa44fdad6107d8507b36d89ba535caf736414
6
+ metadata.gz: 34e5d358da0294ec5819af4afaa9594bfa313008d8f038986d494b33e9600161ab0a076c3bc42a60f49e57eba62fb56cecf2f02dcfaf76388d896062d4370429
7
+ data.tar.gz: efe83c55538e493b71104e53a8a20a24fc1be05c8b5f1250f3bed6f5a35c23f76a427df209e46da6f06dfc329ad1250a7aeb62447a9f954800bc73be2dda83d7
data/CHANGELOG CHANGED
@@ -1,6 +1,10 @@
1
+ === 1.3.0 (2015-08-17)
2
+
3
+ * Don't run before_all/after_all/around_all hooks for classes with no tests/specs when using minitest >= 5.8.0 (jeremyevans) (#7)
4
+
1
5
  === 1.2.0 (2015-07-02)
2
6
 
3
- * Add minitest/hooks/test file, which doesn't requrie minitest/spec (janko-m) (#9, #10)
7
+ * Add minitest/hooks/test file, which doesn't require minitest/spec (janko-m) (#9, #10)
4
8
 
5
9
  === 1.1.0 (2015-05-11)
6
10
 
@@ -61,16 +61,17 @@ module Minitest::Hooks::ClassMethods
61
61
  # When running the specs in the class, first create a singleton instance, the singleton is
62
62
  # used to implement around_all/before_all/after_all hooks, and each spec will run as a
63
63
  # dup of the singleton instance.
64
- def run(reporter, options={})
65
- r = nil
64
+ def with_info_handler(reporter, &block)
66
65
  @instance = new(NEW)
67
66
 
68
67
  @instance.around_all do
69
- @instance.before_all
70
- r = super(reporter, options)
71
- @instance.after_all
68
+ begin
69
+ @instance.before_all
70
+ super(reporter, &block)
71
+ ensure
72
+ @instance.after_all
73
+ end
72
74
  end
73
- r
74
75
  end
75
76
 
76
77
  # If type is :all, set the around_all hook, otherwise set the around hook.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest