declarative_minitest 0.1.0 → 0.1.1

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/minitest/declarative.rb +20 -0
  3. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d38e85b804ba99c4b4f7f89aef8d06db16c5c78a
4
- data.tar.gz: 99b0fb1600bd24b36a2622387572d3ba2fa65996
3
+ metadata.gz: 1e375575cad8354689db154b118a05543f11e8c9
4
+ data.tar.gz: b0a4934b1181976296d275ad5ad9c59004330c1a
5
5
  SHA512:
6
- metadata.gz: 488cbad39fe77496c564e620ff03eb4ee49d2c71c816888ed5c10aa451a3db821707c743ab174a08fdb7d20be782c8ef0b27b9f170d63b1ad41b71c79de13749
7
- data.tar.gz: 0fa45a771131f0af91168c2681ff8287b5745934be2dfb0ad8719a7385035849a30fc007c8b20b8a0cf53599abe62633c642257faee6448ba1216ba3e63ca7ef
6
+ metadata.gz: cb594c787396e5271121d759cad226fc10db700a6f3c9ba890190a2bad540a1eb66000bb1ba1cc2ff114fdd0ff18a02049e5d913870553d4af1318385067f8ab
7
+ data.tar.gz: 0fb0a93778211b03902414ce1c06390bc00e13b780847977ca22f39222826c0376d4956fb000f03bddebcfd2ed877f58f56b14130d2695b64391dac0a8f55a19
@@ -21,5 +21,25 @@ module Minitest
21
21
  end
22
22
  end
23
23
  end
24
+
25
+ def self.setup(&block)
26
+ if block_given?
27
+ define_method(:setup, &block)
28
+ else
29
+ define_method(:setup) do
30
+ flunk "No implementation provided for #{name}"
31
+ end
32
+ end
33
+ end
34
+
35
+ def self.teardown(&block)
36
+ if block_given?
37
+ define_method(:teardown, &block)
38
+ else
39
+ define_method(:teardown) do
40
+ flunk "No implementation provided for #{name}"
41
+ end
42
+ end
43
+ end
24
44
  end
25
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declarative_minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zhu
@@ -9,7 +9,21 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2018-08-09 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
13
27
  description: Ports Rails declarative minitest into regular minitest
14
28
  email:
15
29
  - peter@peterzhu.ca