minitest-around 0.2.0.pre → 0.2.0.pre2
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 +4 -4
- data/lib/minitest/around/spec.rb +1 -1
- data/lib/minitest/around/version.rb +1 -1
- data/test/around_spec.rb +8 -8
- data/test/around_test.rb +1 -1
- data/test/helper.rb +2 -0
- data/test/nested_spec.rb +2 -2
- data/test/nested_test.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cda60c7a4c065dcf16070c161a0d7adb249796e6
|
4
|
+
data.tar.gz: 3948e7b82902432b9e93057084c217df75b3bbcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1633f55347c5db480a113bdca36c493117efd0aa107d3166b993fbfc726c6b8fc6be835aeba3544af6214a3171b15f2b721444061475f239ef4b3c1de0004411
|
7
|
+
data.tar.gz: 1e7c2f619f9e327d4a0a6f3331c644229f9400ea8ecde9fb8bef15bd500d06bbd1d05d21e3b6fe2a9489d92b00fec92b293bf3327838a74006355a7adb5a43c0
|
data/lib/minitest/around/spec.rb
CHANGED
data/test/around_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'helper'
|
2
2
|
require 'minitest/around/spec'
|
3
3
|
|
4
4
|
describe "Minitest Around" do
|
@@ -38,20 +38,20 @@ describe "Minitest Around" do
|
|
38
38
|
let(:list) { [] }
|
39
39
|
before { list << 1 }
|
40
40
|
before { list << 2 }
|
41
|
-
after { list << 6 }
|
42
|
-
around { |t| list << 3; t.call; list << 7 }
|
43
|
-
before { list << 4 }
|
44
|
-
around { |t| list << 5; t.call; list << 8 }
|
45
|
-
after { list << 9 }
|
46
41
|
after do
|
47
42
|
if @xxx == 1
|
48
|
-
list.must_equal [1, 2, 3, 4, 5,
|
43
|
+
list.must_equal [1, 2, 3, 4, 5, 9, 8, 7, 6]
|
49
44
|
elsif @xxx == 2
|
50
|
-
list.must_equal [1, 2, 3, 4, 5, 51,
|
45
|
+
list.must_equal [1, 2, 3, 4, 5, 51, 9, 8, 7, 6]
|
51
46
|
else
|
52
47
|
raise
|
53
48
|
end
|
54
49
|
end
|
50
|
+
after { list << 6 }
|
51
|
+
around { |t| list << 3; t.call; list << 7 }
|
52
|
+
before { list << 4 }
|
53
|
+
around { |t| list << 5; t.call; list << 8 }
|
54
|
+
after { list << 9 }
|
55
55
|
|
56
56
|
it "orders" do
|
57
57
|
@xxx = 1
|
data/test/around_test.rb
CHANGED
data/test/helper.rb
ADDED
data/test/nested_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'helper'
|
2
2
|
require 'minitest/around'
|
3
3
|
|
4
4
|
$var = []
|
@@ -9,7 +9,7 @@ describe 'Outer' do
|
|
9
9
|
end
|
10
10
|
after do
|
11
11
|
$var << :after
|
12
|
-
$var.must_equal [:before, :
|
12
|
+
$var.must_equal [:before, :begin, :ibefore, :ibegin, :during, :iend, :iafter, :end, :after]
|
13
13
|
end
|
14
14
|
around do |test|
|
15
15
|
$var << :begin
|
data/test/nested_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-around
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Suschlik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- minitest-around.gemspec
|
74
74
|
- test/around_spec.rb
|
75
75
|
- test/around_test.rb
|
76
|
+
- test/helper.rb
|
76
77
|
- test/nested_spec.rb
|
77
78
|
- test/nested_test.rb
|
78
79
|
homepage: https://github.com/splattael/minitest-around
|