tiramisu 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 +4 -4
- data/README.md +2 -0
- data/lib/tiramisu/assert.rb +8 -3
- data/lib/tiramisu/core_ext.rb +2 -1
- data/lib/tiramisu/expectations/raise.rb +32 -0
- data/lib/tiramisu/expectations/return.rb +32 -0
- data/lib/tiramisu/expectations/throw.rb +24 -0
- data/lib/tiramisu/expectations/with.rb +36 -0
- data/lib/tiramisu/expectations.rb +82 -0
- data/lib/tiramisu/run.rb +32 -15
- data/lib/tiramisu/unit.rb +10 -15
- data/lib/tiramisu/util.rb +3 -3
- data/lib/tiramisu.rb +2 -1
- data/test/receive_and_raise_test.rb +8 -16
- data/test/receive_and_return_test.rb +7 -35
- data/test/receive_and_throw_test.rb +6 -6
- data/test/receive_test.rb +4 -8
- data/test/receive_with_test.rb +8 -13
- data/test/skip_test.rb +2 -7
- data/tiramisu.gemspec +2 -3
- metadata +22 -10
- data/README.md.html +0 -348
- data/lib/tiramisu/mock/expectation/raise.rb +0 -34
- data/lib/tiramisu/mock/expectation/return.rb +0 -34
- data/lib/tiramisu/mock/expectation/throw.rb +0 -26
- data/lib/tiramisu/mock/expectation/with.rb +0 -38
- data/lib/tiramisu/mock/expectation.rb +0 -44
- data/lib/tiramisu/mock.rb +0 -48
data/test/receive_with_test.rb
CHANGED
@@ -4,9 +4,8 @@ describe :receive_with do
|
|
4
4
|
this = self
|
5
5
|
spec rand do
|
6
6
|
test :test do
|
7
|
-
x =
|
8
|
-
|
9
|
-
x + 1
|
7
|
+
expect(x = 'x').to_receive(:+).with('y')
|
8
|
+
x + 'y'
|
10
9
|
end
|
11
10
|
this.assert_equal :__tiramisu_passed__, run(:test)
|
12
11
|
end
|
@@ -16,8 +15,7 @@ describe :receive_with do
|
|
16
15
|
this = self
|
17
16
|
spec rand do
|
18
17
|
test :test do
|
19
|
-
x =
|
20
|
-
expect(x).to_receive(:join).with('')
|
18
|
+
expect(x = []).to_receive(:join).with('')
|
21
19
|
x.join
|
22
20
|
end
|
23
21
|
this.assert_match /Looks like :join message never was called with expected arguments/, run(:test).reason*' '
|
@@ -28,8 +26,7 @@ describe :receive_with do
|
|
28
26
|
this = self
|
29
27
|
spec rand do
|
30
28
|
test :test do
|
31
|
-
x =
|
32
|
-
expect(x).to_receive(:join).with('')
|
29
|
+
expect(x = []).to_receive(:join).with('')
|
33
30
|
x.join('/')
|
34
31
|
end
|
35
32
|
this.assert_match /Looks like :join message never was called with expected arguments/, run(:test).reason*' '
|
@@ -40,9 +37,8 @@ describe :receive_with do
|
|
40
37
|
this = self
|
41
38
|
spec rand do
|
42
39
|
test :test do
|
43
|
-
x =
|
44
|
-
|
45
|
-
x + 1
|
40
|
+
expect(x = 'x').to_receive(:+).with {|a| a == ['y']}
|
41
|
+
x + 'y'
|
46
42
|
end
|
47
43
|
this.assert_equal :__tiramisu_passed__, run(:test)
|
48
44
|
end
|
@@ -52,9 +48,8 @@ describe :receive_with do
|
|
52
48
|
this = self
|
53
49
|
spec rand do
|
54
50
|
test :test do
|
55
|
-
x =
|
56
|
-
|
57
|
-
x + 1
|
51
|
+
expect(x = 'x').to_receive(:+).with {false}
|
52
|
+
x + 'y'
|
58
53
|
end
|
59
54
|
this.assert_match /Looks like :\+ message never was called with expected arguments/, run(:test).reason*' '
|
60
55
|
end
|
data/test/skip_test.rb
CHANGED
@@ -21,20 +21,15 @@ describe :skip do
|
|
21
21
|
r, w = IO.pipe
|
22
22
|
fork do
|
23
23
|
r.close
|
24
|
-
buffer = []
|
25
24
|
Tiramisu.define_and_register_a_spec :skip_test, proc {
|
26
25
|
test :x do
|
27
|
-
buffer << 'a'
|
28
26
|
skip
|
29
|
-
|
27
|
+
w.print 'bad'
|
30
28
|
end
|
31
29
|
}
|
32
30
|
Tiramisu.run
|
33
|
-
w.print({skips: Tiramisu.skips.size, buffer: buffer}.to_json)
|
34
31
|
end
|
35
32
|
w.close
|
36
|
-
|
37
|
-
assert_equal 1, data['skips']
|
38
|
-
assert_equal ["a"], data['buffer']
|
33
|
+
assert_equal '', r.read
|
39
34
|
end
|
40
35
|
end
|
data/tiramisu.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
-
name, version = 'tiramisu 0.0.
|
3
|
+
name, version = 'tiramisu 0.0.2'.split
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = name
|
6
6
|
spec.version = version
|
@@ -17,12 +17,11 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = Dir['bin/*'].map{ |f| File.basename(f)}
|
18
18
|
|
19
19
|
spec.required_ruby_version = '>= 2'
|
20
|
-
|
21
20
|
spec.add_runtime_dependency 'tty-progressbar', '~> 0.5'
|
22
21
|
spec.add_runtime_dependency 'tty-screen', '~> 0.1'
|
23
22
|
spec.add_runtime_dependency 'pastel', '~> 0.4'
|
24
23
|
spec.add_runtime_dependency 'coderay', '~> 1'
|
25
|
-
|
24
|
+
spec.add_runtime_dependency 'json', '~> 1.8'
|
26
25
|
spec.add_development_dependency 'minitest', '~> 5.5'
|
27
26
|
spec.add_development_dependency 'bundler', '~> 1.8'
|
28
27
|
spec.add_development_dependency 'rake', '~> 10.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiramisu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slee Woo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-progressbar
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: json
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.8'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.8'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: minitest
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,18 +135,16 @@ files:
|
|
121
135
|
- Gemfile
|
122
136
|
- LICENSE.txt
|
123
137
|
- README.md
|
124
|
-
- README.md.html
|
125
138
|
- Rakefile
|
126
139
|
- bin/tiramisu
|
127
140
|
- lib/tiramisu.rb
|
128
141
|
- lib/tiramisu/assert.rb
|
129
142
|
- lib/tiramisu/core_ext.rb
|
130
|
-
- lib/tiramisu/
|
131
|
-
- lib/tiramisu/
|
132
|
-
- lib/tiramisu/
|
133
|
-
- lib/tiramisu/
|
134
|
-
- lib/tiramisu/
|
135
|
-
- lib/tiramisu/mock/expectation/with.rb
|
143
|
+
- lib/tiramisu/expectations.rb
|
144
|
+
- lib/tiramisu/expectations/raise.rb
|
145
|
+
- lib/tiramisu/expectations/return.rb
|
146
|
+
- lib/tiramisu/expectations/throw.rb
|
147
|
+
- lib/tiramisu/expectations/with.rb
|
136
148
|
- lib/tiramisu/pretty_print.rb
|
137
149
|
- lib/tiramisu/run.rb
|
138
150
|
- lib/tiramisu/unit.rb
|
@@ -179,5 +191,5 @@ rubyforge_project:
|
|
179
191
|
rubygems_version: 2.4.5
|
180
192
|
signing_key:
|
181
193
|
specification_version: 4
|
182
|
-
summary: tiramisu-0.0.
|
194
|
+
summary: tiramisu-0.0.2
|
183
195
|
test_files: []
|