matest 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0503943c0bc0e1cb9e6f7ce6b7dda83ffc9f36f
4
- data.tar.gz: 377a6890e8bf973cd0eb95248de7012979af510f
3
+ metadata.gz: 4928f8622b966f000c3e4a08a0191c4f0be8d79e
4
+ data.tar.gz: 926dbbb38e11235127b120ddd21cfcc753311fbc
5
5
  SHA512:
6
- metadata.gz: f9057ef4983f5b5830c6735c30c923dd366d11fb67791ab93ca147a596d25e0b3259e15b4078a6e73c60da6339823c2116b44811f5e20f93e3667810b5f5576e
7
- data.tar.gz: 504844e60f56b6cf9a8cb290112f006e6d5d10e4c7b7b4dba9a28d3b7abc6dbb72edd62438e9ce596de477968a34713e72cdba5ce79347d35f9f36ec169eded3
6
+ metadata.gz: 8a8b9cbc0884cf97d41a250aa7319c94faaf2d727fc39a64a2091af3e4bcc5bea714aa5f2c5f9382d2725eeefddfe0f196585edaaff0416f46d25e9ea9e11311
7
+ data.tar.gz: 2d979b53db462b77de5929fcabf067ab110c84fcefb10567682bf4065ee209a1cb9744940a4ce66d814dd5976967af7838314b4767be2fab311643703c771b3f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Matest
2
2
 
3
- TODO: Write a gem description
3
+ Tests Gasoleros (Cheap tests)
4
4
 
5
5
  ## Installation
6
6
 
data/bin/mt CHANGED
@@ -8,18 +8,18 @@ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
8
8
  require "pathname"
9
9
  require "matest"
10
10
 
11
- RUNNER = Matest::Runner.new
11
+ @RUNNER = Matest::Runner.new
12
12
 
13
13
  ARGV.each do |file|
14
- RUNNER.load_file(Pathname(file).expand_path)
14
+ @RUNNER.load_file(Pathname(file).expand_path)
15
15
  end
16
16
 
17
- RUNNER.execute!
17
+ @RUNNER.execute!
18
18
 
19
19
  time_elapsed = Time.now - start_time
20
20
 
21
21
  puts
22
- info = RUNNER.info
22
+ info = @RUNNER.info
23
23
 
24
24
  def spec_detail(info)
25
25
  info[:num_specs].map { |name, num|
@@ -182,7 +182,6 @@ module Matest
182
182
  end
183
183
  end
184
184
 
185
-
186
185
  def scope(description=nil, &block)
187
- RUNNER.example_groups << Matest::ExampleGroup.new(block)
186
+ (@RUNNER || Matest::Runner.new).example_groups << Matest::ExampleGroup.new(block)
188
187
  end
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,13 +1,20 @@
1
1
  require "spec_helper"
2
2
 
3
+ def get_statuses(&block)
4
+ group = block.call.first
5
+ group.execute!
6
+ group.statuses
7
+ end
3
8
  describe "scope" do
4
9
  it "can pass" do
5
- res = scope do
6
- spec do
7
- true
10
+ statuses = get_statuses do
11
+ scope do
12
+ spec do
13
+ true
14
+ end
8
15
  end
9
16
  end
10
- res.must_be_kind_of(Matest::SpecPassed)
17
+ statuses.first.must_be_kind_of(Matest::SpecPassed)
11
18
  end
12
19
  end
13
20
 
@@ -21,7 +28,6 @@ describe "spec" do
21
28
  res.must_be_kind_of(Matest::SpecPassed)
22
29
  end
23
30
  end
24
-
25
31
  it "forwards the block" do
26
32
  scope do
27
33
  res = spec do
@@ -126,34 +132,3 @@ describe "xspec" do
126
132
  end
127
133
  end
128
134
  end
129
-
130
- ####
131
- #### spec do
132
- #### 5 == 5
133
- #### end
134
- ####
135
- #### spec do
136
- #### 5 == 6
137
- #### end
138
- ####
139
- #### spec do
140
- #### skip
141
- #### end
142
- ####
143
- #### spec do
144
- #### 10
145
- #### end
146
- ####
147
- ####
148
- ####
149
- ####
150
- #### # >> .
151
- #### # >>
152
- #### # >> F
153
- #### # >>
154
- #### # >> S
155
- #### # >>
156
- #### # >> X
157
- #### # >>
158
- #### # >> {:message=>"The spec needs to return either true or false, but it returned 10", :block=>#<Proc:0x00000001f61408@-:17>}
159
- #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti