minitest-around 0.0.5 → 0.0.6.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/minitest/around/spec.rb +1 -1
- data/lib/minitest/around/unit.rb +5 -5
- data/lib/minitest/around/version.rb +1 -1
- data/test/nested_spec.rb +36 -0
- metadata +20 -11
- checksums.yaml +0 -7
data/lib/minitest/around/spec.rb
CHANGED
data/lib/minitest/around/unit.rb
CHANGED
@@ -3,10 +3,10 @@ require 'minitest/around/version'
|
|
3
3
|
|
4
4
|
class MiniTest::Unit::TestCase
|
5
5
|
def run_test(name)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
around { |*args| __send__(name, *args) }
|
7
|
+
end
|
8
|
+
|
9
|
+
def around(*args)
|
10
|
+
yield *args
|
11
11
|
end
|
12
12
|
end
|
data/test/nested_spec.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/around'
|
3
|
+
|
4
|
+
$var = []
|
5
|
+
|
6
|
+
describe 'Outer' do
|
7
|
+
before do
|
8
|
+
$var << :before
|
9
|
+
end
|
10
|
+
after do
|
11
|
+
$var << :after
|
12
|
+
$var.must_equal [:before, :ibefore, :begin, :ibegin, :during, :iend, :end, :iafter, :after]
|
13
|
+
end
|
14
|
+
around do |test|
|
15
|
+
$var << :begin
|
16
|
+
test.call
|
17
|
+
$var << :end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe 'Inner' do
|
21
|
+
before do
|
22
|
+
$var << :ibefore
|
23
|
+
end
|
24
|
+
after do
|
25
|
+
$var << :iafter
|
26
|
+
end
|
27
|
+
around do |test|
|
28
|
+
$var << :ibegin
|
29
|
+
test.call
|
30
|
+
$var << :iend
|
31
|
+
end
|
32
|
+
it 'testing' do
|
33
|
+
$var << :during
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-around
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6.pre
|
5
|
+
prerelease: 6
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Peter Suschlik
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: minitest
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,15 +30,17 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rdoc
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- - '>='
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- - '>='
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
description: Alternative for setup/teardown dance.
|
@@ -61,29 +66,33 @@ files:
|
|
61
66
|
- minitest-around.gemspec
|
62
67
|
- test/around_spec.rb
|
63
68
|
- test/around_test.rb
|
69
|
+
- test/nested_spec.rb
|
64
70
|
homepage: https://github.com/splattael/minitest-around
|
65
71
|
licenses:
|
66
72
|
- MIT
|
67
|
-
metadata: {}
|
68
73
|
post_install_message:
|
69
74
|
rdoc_options: []
|
70
75
|
require_paths:
|
71
76
|
- lib
|
72
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
73
79
|
requirements:
|
74
|
-
- - '>='
|
80
|
+
- - ! '>='
|
75
81
|
- !ruby/object:Gem::Version
|
76
82
|
version: '0'
|
83
|
+
segments:
|
84
|
+
- 0
|
85
|
+
hash: 995209263
|
77
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
78
88
|
requirements:
|
79
|
-
- - '
|
89
|
+
- - ! '>'
|
80
90
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
91
|
+
version: 1.3.1
|
82
92
|
requirements: []
|
83
93
|
rubyforge_project: minitest-around
|
84
|
-
rubygems_version:
|
94
|
+
rubygems_version: 1.8.24
|
85
95
|
signing_key:
|
86
|
-
specification_version:
|
96
|
+
specification_version: 3
|
87
97
|
summary: Around block for minitest.
|
88
98
|
test_files: []
|
89
|
-
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: e74398d843d7c3801fd2d6daf3b8ac1101592bb7
|
4
|
-
data.tar.gz: 37c7b514013ebd08ebc53a0a65a61b84ee7b6dc4
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 2e0264637f8969caaf09efb7aaaa35b21b8b6a4b473a32ff8c1ba4214682417e81c4fde613b2081632323771943eb352656ffcb2a704802012ab59f4c5d96fcf
|
7
|
-
data.tar.gz: a41bae9f6bc0aa9f382f911d4e55ff6ec3ca596286b671ca83985d87f1122117cf249fb9e3b05d7f6091e90c62947dcd5329d9acee8be54682b80e76faf356ab
|