testdata 0.8.11 → 0.8.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/testdata.rb +11 -10
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85df418ee36fbf63d1251c05026d15f1dce0bd3d
|
4
|
+
data.tar.gz: 32271bb343c7bbec815b1544c2b6619cf84ff996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f6029e4db3a86de52f62bb8b558c536e421b01a1259c26e5fbb04c9214083c85285a5cf012df827fe63b5c1c5f7a4263b8fffadf4858dff6b23113fa77aff61
|
7
|
+
data.tar.gz: c8455c98ebdb47410d1c7c42d83b07b01c98bab4259bb3e199125d26a87f650ffe01406dc998f6541fbd938b9b44fad3aceee9e96fafc39562f9d1c7a402ac8e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/testdata.rb
CHANGED
@@ -61,15 +61,14 @@ class Testdata
|
|
61
61
|
|
62
62
|
input_names = input_nodes.map(&:name)
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
type_or_desc = XPath.match(node, xpath).map(&:to_s).find{|x| x != ''}
|
64
|
+
summary = XPath.first node, 'summary'
|
65
|
+
type, desc = summary.text('type'), summary.text('description')
|
67
66
|
|
68
67
|
xpath = "records/io/summary[type='output']/*"
|
69
68
|
raw_output = XPath.match(node, xpath)
|
70
69
|
output_values = raw_output.length > 0 ? raw_output[1..-1].map(&stringify) : []
|
71
70
|
|
72
|
-
[path_no, input_values, input_names,
|
71
|
+
[path_no, input_values, input_names, type, output_values, desc]
|
73
72
|
end
|
74
73
|
|
75
74
|
def run(x=nil, debug2=nil)
|
@@ -95,11 +94,13 @@ class Testdata
|
|
95
94
|
|
96
95
|
def test_id(id='')
|
97
96
|
|
98
|
-
path_no, inputs, input_names,
|
99
|
-
|
97
|
+
path_no, inputs, input_names, type, expected, @desc =
|
98
|
+
testdata_values(id.to_s)
|
100
99
|
@inputs = inputs
|
101
100
|
tests() # load the routes
|
102
|
-
|
101
|
+
|
102
|
+
raw_actual = run_route type
|
103
|
+
puts "warning: no test route found for " + type unless raw_actual
|
103
104
|
|
104
105
|
result = nil
|
105
106
|
@success << [nil, path_no.to_i]
|
@@ -117,7 +118,7 @@ class Testdata
|
|
117
118
|
.join("\n")
|
118
119
|
|
119
120
|
puts "\ninputs: \n" + inputs
|
120
|
-
puts "\ntype or description:\n
|
121
|
+
puts "\ntype or description:\n %s: %s" % [type, @desc]
|
121
122
|
puts "\nexpected : \n " + b.inspect
|
122
123
|
puts "\nactual : \n " + a.inspect + "\n"
|
123
124
|
end
|
@@ -163,8 +164,8 @@ class Testdata
|
|
163
164
|
|
164
165
|
|
165
166
|
def test(s)
|
166
|
-
|
167
|
-
self.add_route(s){yield(@inputs)}
|
167
|
+
#@inputs = @inputs.first if @inputs.length == 1
|
168
|
+
self.add_route(s){yield(*(@inputs + [@desc]))}
|
168
169
|
end
|
169
170
|
|
170
171
|
def summary()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testdata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
vWFtb5VPsjLRwClW20j7R9zEUv5XjYoyxcUn1W1xQINMVIQMtvMhouLBeWTXF7g4
|
32
32
|
ab2xQAvsYawLTw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-03-
|
34
|
+
date: 2014-03-16 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: app-routes
|
metadata.gz.sig
CHANGED
Binary file
|