84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# File 'lib/atp/runner.rb', line 84
def on_test(node)
if id = node.find(:id)
id = id.to_a[0]
if failed_test_ids.include?(id)
node = node.add(node.updated(:failed, []))
failed = true
if n_on_fail = node.find(:on_fail)
node = node.remove(n_on_fail)
end
end
end
unless failed
if n_on_pass = node.find(:on_pass)
node = node.remove(n_on_pass)
end
end
unless completed?
container << node
process_all(n_on_fail) if n_on_fail
process_all(n_on_pass) if n_on_pass
end
if failed
if @groups.last
@groups.pop
@groups << false
end
if n = node.find(:on_fail)
orig = @continue
@continue ||= !!n.find(:continue)
process_all(n)
@continue = orig
end
else
if n = node.find(:on_pass)
process_all(n)
end
end
end
|