testdata 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/testdata.rb +6 -3
- metadata +1 -1
data/lib/testdata.rb
CHANGED
@@ -38,12 +38,15 @@ class Path
|
|
38
38
|
node = XPath.first(@doc.root, "records/test[summary/description='#{description}']")
|
39
39
|
path_no = node.text('summary/path')
|
40
40
|
raise "Path error: node not found" unless node
|
41
|
+
|
42
|
+
result = nil
|
43
|
+
|
41
44
|
begin
|
42
|
-
|
45
|
+
result = yield(*%w(input output).map {|x| Select.new(x,node)})
|
43
46
|
rescue
|
44
|
-
|
47
|
+
result = false
|
45
48
|
ensure
|
46
|
-
@success << [
|
49
|
+
@success << [result, path_no]
|
47
50
|
end
|
48
51
|
end
|
49
52
|
end
|