matest 1.1.3 → 1.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 106a40de6a36b7d1d7221244deda124306329545
4
- data.tar.gz: c093d22db122b4293f588613501213496f5974a8
3
+ metadata.gz: 0ef04c88e374d09410f7e524b755d30d75508ef5
4
+ data.tar.gz: 505f6005edf5df314ffa8b78177e888fa1388bf6
5
5
  SHA512:
6
- metadata.gz: 84a55dd97dc70e9af4e8a6e51c70fe3b321aadf5aadd7d3e57da14a266a354885588c8268512d47bcd544afa83fcdcac4355ddb41ca4ab71f239369ceffd3c24
7
- data.tar.gz: c17087cc4946f55fa00b9d8b5a2958573ee6e02e6a4cb3ff699fe5025cbe1c3ed71586ffc27441e7617abc9a9d982a195d182cf61e49ed50eae834062cf09ee6
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:
@@ -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
- [:it, :test, :example].each do |m|
116
- alias :"#{m}" :spec
117
- alias :"x#{m}" :xspec
118
- end
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
- [:describe, :context, :group].each do |m|
166
- alias :"#{m}" :scope
167
- alias :"x#{m}" :xscope
168
- end
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
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
@@ -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.3
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-27 00:00:00.000000000 Z
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