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 +4 -4
- data/README.md +1 -1
- data/bin/mt +4 -4
- data/lib/matest.rb +1 -2
- data/lib/matest/version.rb +1 -1
- data/spec/matest_spec.rb +11 -36
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4928f8622b966f000c3e4a08a0191c4f0be8d79e
|
4
|
+
data.tar.gz: 926dbbb38e11235127b120ddd21cfcc753311fbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a8b9cbc0884cf97d41a250aa7319c94faaf2d727fc39a64a2091af3e4bcc5bea714aa5f2c5f9382d2725eeefddfe0f196585edaaff0416f46d25e9ea9e11311
|
7
|
+
data.tar.gz: 2d979b53db462b77de5929fcabf067ab110c84fcefb10567682bf4065ee209a1cb9744940a4ce66d814dd5976967af7838314b4767be2fab311643703c771b3f
|
data/README.md
CHANGED
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|
|
data/lib/matest.rb
CHANGED
data/lib/matest/version.rb
CHANGED
data/spec/matest_spec.rb
CHANGED
@@ -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
|
-
|
6
|
-
|
7
|
-
|
10
|
+
statuses = get_statuses do
|
11
|
+
scope do
|
12
|
+
spec do
|
13
|
+
true
|
14
|
+
end
|
8
15
|
end
|
9
16
|
end
|
10
|
-
|
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
|
-
#
|