webpoke 0.0.45 → 0.0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Webpoke/Test.rb +6 -1
- data/lib/Webpoke/version.rb +1 -1
- data/lib/webpoke.rb +6 -0
- 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: 8054a83903c68344996f887040ba1d2a7f52a108
|
4
|
+
data.tar.gz: 68f642e34925bec30903e5881c54d579ec551a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a15c10d9059d1a64d22aec2a44e8fa84e6ffa832e969edb031df9c8fa5b086f0287c930ad2e3792cef0c90456a8502d21c7d6442a3e1001e62517fb3a2d99f0
|
7
|
+
data.tar.gz: 24d042990df8a6f64553450a36733e851c2b75b4d1340fb1a3cfee78584f7a0a51b4b2354db37f62984b3d4990bbccbc0e5afd0e6e536b8f70c35cf24f1de42f
|
data/lib/Webpoke/Test.rb
CHANGED
@@ -13,12 +13,17 @@ class Webpoke::Test
|
|
13
13
|
@method = @method || 'get'
|
14
14
|
@headers = @headers || {}
|
15
15
|
@on_success = [];
|
16
|
+
@ran = false;
|
16
17
|
end
|
17
18
|
|
18
19
|
def should_parse?
|
19
20
|
return @parse
|
20
21
|
end
|
21
22
|
|
23
|
+
def did_run?
|
24
|
+
@ran
|
25
|
+
end
|
26
|
+
|
22
27
|
def on (response, &block)
|
23
28
|
|
24
29
|
if (response == 'success')
|
@@ -111,7 +116,7 @@ Returns the test description
|
|
111
116
|
Run the test
|
112
117
|
=end
|
113
118
|
def passed? (response, body)
|
114
|
-
|
119
|
+
@ran = true
|
115
120
|
@response = {
|
116
121
|
body: body,
|
117
122
|
code: response
|
data/lib/Webpoke/version.rb
CHANGED
data/lib/webpoke.rb
CHANGED
@@ -178,6 +178,7 @@ module Webpoke
|
|
178
178
|
next if group && test.group != group
|
179
179
|
|
180
180
|
next if test.dependant?
|
181
|
+
next if test.did_run?
|
181
182
|
|
182
183
|
gauge_success(test)
|
183
184
|
|
@@ -205,6 +206,11 @@ module Webpoke
|
|
205
206
|
end
|
206
207
|
|
207
208
|
groups[test.group][:tests] << test.describe
|
209
|
+
|
210
|
+
test.on_success.each do |dp|
|
211
|
+
dp.call()
|
212
|
+
end
|
213
|
+
|
208
214
|
end
|
209
215
|
|
210
216
|
return JSON.pretty_generate groups.values
|