matest 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/matest.rb +18 -9
- data/lib/matest/version.rb +1 -1
- data/spec/matest_specs/aliases_spec.rb +65 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ef04c88e374d09410f7e524b755d30d75508ef5
|
4
|
+
data.tar.gz: 505f6005edf5df314ffa8b78177e888fa1388bf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f364ae4bf2c77c7b1f07abd412306370a824c0d68ae92dbd5092a23f17133ebf176aada8e2a62b33a326d90012286508493d23c297394f00321a1f1fa985e306
|
7
|
+
data.tar.gz: f792735a4069cbc2e2581a16c4cd620e3f8e7d66c360576a58adbdb4a1c90b7e47221a9192054d5e3cb47e5bb32ad10a38394b68d3d781885facdb58ddeed130
|
data/README.md
CHANGED
@@ -171,6 +171,15 @@ You may be used to other keywords provenient from different testing frameworks.
|
|
171
171
|
- `test` (and `xtest`)
|
172
172
|
- `example` (and `xexample`)
|
173
173
|
|
174
|
+
## TODO ... or not TODO
|
175
|
+
- Colorize output
|
176
|
+
- Before and after callbacks
|
177
|
+
- matest-given-ish
|
178
|
+
- Allow seamless transition (separated gems)
|
179
|
+
* matest-assert (to move from TestUnit, Minitest::Unit, Cutest)
|
180
|
+
* matest-should (to move from RSpec
|
181
|
+
* matest-must (to move from Minitest::Spec)
|
182
|
+
|
174
183
|
## Installation
|
175
184
|
|
176
185
|
Add this line to your application's Gemfile:
|
data/lib/matest.rb
CHANGED
@@ -95,7 +95,7 @@ module Matest
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def spec(description=nil, &block)
|
98
|
-
current_example = block_given? ? block : -> { Matest::SkipMe.new }
|
98
|
+
current_example = block_given? ? block : ->(*) { Matest::SkipMe.new }
|
99
99
|
specs << Example.new(current_example, description, lets)
|
100
100
|
end
|
101
101
|
|
@@ -112,10 +112,15 @@ module Matest
|
|
112
112
|
spec(description)
|
113
113
|
end
|
114
114
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
115
|
+
alias :it :spec
|
116
|
+
alias :xit :xspec
|
117
|
+
|
118
|
+
alias :test :spec
|
119
|
+
alias :xtest :xspec
|
120
|
+
|
121
|
+
alias :example :spec
|
122
|
+
alias :xexample :xspec
|
123
|
+
|
119
124
|
|
120
125
|
def self.let(var_name, &block)
|
121
126
|
define_method(var_name) do
|
@@ -162,7 +167,11 @@ def xscope(description=nil, &block)
|
|
162
167
|
# no-op
|
163
168
|
end
|
164
169
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
170
|
+
alias :describe :scope
|
171
|
+
alias :xdescribe :xscope
|
172
|
+
|
173
|
+
alias :context :scope
|
174
|
+
alias :xcontext :xscope
|
175
|
+
|
176
|
+
alias :group :scope
|
177
|
+
alias :xgroup :xscope
|
data/lib/matest/version.rb
CHANGED
@@ -0,0 +1,65 @@
|
|
1
|
+
scope do
|
2
|
+
spec { true }
|
3
|
+
xspec { true }
|
4
|
+
|
5
|
+
example { true }
|
6
|
+
xexample { true }
|
7
|
+
|
8
|
+
it { true }
|
9
|
+
xit { true }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe do
|
13
|
+
spec { true }
|
14
|
+
xspec { true }
|
15
|
+
|
16
|
+
example { true }
|
17
|
+
xexample { true }
|
18
|
+
|
19
|
+
it { true }
|
20
|
+
xit { true }
|
21
|
+
end
|
22
|
+
|
23
|
+
context do
|
24
|
+
spec { true }
|
25
|
+
xspec { true }
|
26
|
+
|
27
|
+
example { true }
|
28
|
+
xexample { true }
|
29
|
+
|
30
|
+
it { true }
|
31
|
+
xit { true }
|
32
|
+
end
|
33
|
+
|
34
|
+
xscope do
|
35
|
+
spec { true }
|
36
|
+
xspec { true }
|
37
|
+
|
38
|
+
example { true }
|
39
|
+
xexample { true }
|
40
|
+
|
41
|
+
it { true }
|
42
|
+
xit { true }
|
43
|
+
end
|
44
|
+
|
45
|
+
xdescribe do
|
46
|
+
spec { true }
|
47
|
+
xspec { true }
|
48
|
+
|
49
|
+
example { true }
|
50
|
+
xexample { true }
|
51
|
+
|
52
|
+
it { true }
|
53
|
+
xit { true }
|
54
|
+
end
|
55
|
+
|
56
|
+
xcontext do
|
57
|
+
spec { true }
|
58
|
+
xspec { true }
|
59
|
+
|
60
|
+
example { true }
|
61
|
+
xexample { true }
|
62
|
+
|
63
|
+
it { true }
|
64
|
+
xit { true }
|
65
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Iachetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/matest/version.rb
|
59
59
|
- matest.gemspec
|
60
60
|
- spec/matest_spec.rb
|
61
|
+
- spec/matest_specs/aliases_spec.rb
|
61
62
|
- spec/matest_specs/failing_spec.rb
|
62
63
|
- spec/matest_specs/matchers_spec.rb
|
63
64
|
- spec/matest_specs/nested_scopes_spec.rb
|
@@ -92,6 +93,7 @@ specification_version: 4
|
|
92
93
|
summary: Tests gasoleros (cheap tests).
|
93
94
|
test_files:
|
94
95
|
- spec/matest_spec.rb
|
96
|
+
- spec/matest_specs/aliases_spec.rb
|
95
97
|
- spec/matest_specs/failing_spec.rb
|
96
98
|
- spec/matest_specs/matchers_spec.rb
|
97
99
|
- spec/matest_specs/nested_scopes_spec.rb
|