minitest-around 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.travis.yml +1 -0
- data/README.rdoc +16 -4
- data/examples/mutex_spec.rb +1 -0
- data/examples/mutex_test.rb +1 -0
- data/lib/minitest/around/spec.rb +13 -0
- data/lib/minitest/around/unit.rb +11 -0
- data/lib/minitest/around/version.rb +1 -1
- data/lib/minitest/around.rb +2 -22
- data/minitest-around.gemspec +2 -2
- data/test/around_test.rb +0 -3
- metadata +16 -20
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bc4f666a166c61ba082a748b367b6e81a61136d2
|
4
|
+
data.tar.gz: c4e2cfc49ef804a1b537ecaf1c0298b6b3c3b40f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: aaf7abfbd4fd7da0502aa3692123df682ad9ce77c1e39b847b10f222b7b63d42df5d4e94be5d81f9a1213972cee0691223cf8f6006732cc5b2753d6991fc5109
|
7
|
+
data.tar.gz: 6758a32c1c6a595ef4ab136ac594cb5c601b2a54e5fd5d71b24c8201ac7f2d8aff6fa55c1f7cebc66b8bc42c9e26461b164584d9130003efb4037e88e7ea36db
|
data/.travis.yml
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
= minitest-around
|
1
|
+
= minitest-around
|
2
2
|
|
3
|
-
|
3
|
+
{<img src="https://secure.travis-ci.org/splattael/minitest-around.png?branch=master" alt="Build Status" />}[http://travis-ci.org/splattael/minitest-around] {<img src="https://badge.fury.io/rb/minitest-around.png" alt="Gem Version" />}[http://badge.fury.io/rb/minitest-around] {<img src="https://codeclimate.com/github/splattael/minitest-around.png" />}[https://codeclimate.com/github/splattael/minitest-around]
|
4
|
+
|
5
|
+
Around block for minitest 4.7.X.
|
4
6
|
|
5
7
|
Alternative for setup/teardown dance.
|
6
8
|
|
@@ -17,7 +19,8 @@ RDoc[http://rubydoc.info/github/splattael/minitest-around/master/file/README.rdo
|
|
17
19
|
=== Unit tests
|
18
20
|
|
19
21
|
require 'minitest/autorun'
|
20
|
-
require 'minitest/around'
|
22
|
+
require 'minitest/around/unit'
|
23
|
+
require 'thread'
|
21
24
|
|
22
25
|
class MutexTest < MiniTest::Unit::TestCase
|
23
26
|
def around(&block)
|
@@ -42,7 +45,8 @@ RDoc[http://rubydoc.info/github/splattael/minitest-around/master/file/README.rdo
|
|
42
45
|
=== Spec
|
43
46
|
|
44
47
|
require 'minitest/autorun'
|
45
|
-
require 'minitest/around'
|
48
|
+
require 'minitest/around/spec'
|
49
|
+
require 'thread'
|
46
50
|
|
47
51
|
describe "Mutex" do
|
48
52
|
around do |test|
|
@@ -69,6 +73,14 @@ RDoc[http://rubydoc.info/github/splattael/minitest-around/master/file/README.rdo
|
|
69
73
|
|
70
74
|
Test bodies won't be run if you don't *yield* inside +around+.
|
71
75
|
|
76
|
+
=== Minitest 4.7.X only
|
77
|
+
|
78
|
+
+minitest-around+ currently supports only +minitest+ 4.7.X.
|
79
|
+
|
80
|
+
=== Nesting
|
81
|
+
|
82
|
+
Around block don't nest correctly. Please see GH issue[https://github.com/splattael/minitest-around/issues/2] for more info and workaround[https://github.com/splattael/minitest-around/issues/2#issuecomment-15769151].
|
83
|
+
|
72
84
|
== Contributing
|
73
85
|
|
74
86
|
1. Fork it
|
data/examples/mutex_spec.rb
CHANGED
data/examples/mutex_test.rb
CHANGED
data/lib/minitest/around.rb
CHANGED
@@ -1,23 +1,3 @@
|
|
1
1
|
require 'minitest/around/version'
|
2
|
-
|
3
|
-
|
4
|
-
def run_test(name)
|
5
|
-
if defined?(around)
|
6
|
-
around { |*args| __send__(name, *args) }
|
7
|
-
else
|
8
|
-
__send__(name)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
class MiniTest::Spec
|
14
|
-
def self.around(&outer)
|
15
|
-
define_method(:around) do |&inner|
|
16
|
-
if outer.arity == 1
|
17
|
-
outer.call(inner)
|
18
|
-
else
|
19
|
-
inner.call *outer.call
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
2
|
+
require 'minitest/around/spec'
|
3
|
+
require 'minitest/around/unit'
|
data/minitest-around.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = MiniTest::Around::VERSION
|
8
8
|
s.authors = ["Peter Suschlik"]
|
9
9
|
s.email = ["peter-minitest-around@suschlik.de"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "https://github.com/splattael/minitest-around"
|
11
11
|
s.summary = %q{Around block for minitest.}
|
12
12
|
s.description = %q{Alternative for setup/teardown dance.}
|
13
13
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency 'minitest', '
|
21
|
+
s.add_dependency 'minitest', '~> 4.7.5'
|
22
22
|
|
23
23
|
s.add_development_dependency 'rdoc'
|
24
24
|
end
|
data/test/around_test.rb
CHANGED
metadata
CHANGED
@@ -1,46 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-around
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Peter Suschlik
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minitest
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 4.7.5
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 4.7.5
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rdoc
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
description: Alternative for setup/teardown dance.
|
@@ -60,32 +55,33 @@ files:
|
|
60
55
|
- examples/mutex_spec.rb
|
61
56
|
- examples/mutex_test.rb
|
62
57
|
- lib/minitest/around.rb
|
58
|
+
- lib/minitest/around/spec.rb
|
59
|
+
- lib/minitest/around/unit.rb
|
63
60
|
- lib/minitest/around/version.rb
|
64
61
|
- minitest-around.gemspec
|
65
62
|
- test/around_spec.rb
|
66
63
|
- test/around_test.rb
|
67
|
-
homepage:
|
64
|
+
homepage: https://github.com/splattael/minitest-around
|
68
65
|
licenses: []
|
66
|
+
metadata: {}
|
69
67
|
post_install_message:
|
70
68
|
rdoc_options: []
|
71
69
|
require_paths:
|
72
70
|
- lib
|
73
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
72
|
requirements:
|
76
|
-
- -
|
73
|
+
- - '>='
|
77
74
|
- !ruby/object:Gem::Version
|
78
75
|
version: '0'
|
79
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
77
|
requirements:
|
82
|
-
- -
|
78
|
+
- - '>='
|
83
79
|
- !ruby/object:Gem::Version
|
84
80
|
version: '0'
|
85
81
|
requirements: []
|
86
82
|
rubyforge_project: minitest-around
|
87
|
-
rubygems_version:
|
83
|
+
rubygems_version: 2.0.3
|
88
84
|
signing_key:
|
89
|
-
specification_version:
|
85
|
+
specification_version: 4
|
90
86
|
summary: Around block for minitest.
|
91
87
|
test_files: []
|