test/functional/ft_52_case.rb in ruote-2.2.0 vs test/functional/ft_52_case.rb in ruote-2.3.0
- old
+ new
@@ -3,11 +3,11 @@
# testing ruote
#
# Fri Dec 24 14:53:30 JST 2010
#
-require File.join(File.dirname(__FILE__), 'base')
+require File.expand_path('../base', __FILE__)
#
# Tests about replacement for case x when 'y' and switch(x) constructs.
#
@@ -28,16 +28,16 @@
end
subprocess '${the_case}'
end
- wfid = @engine.launch(pdef, 'the_case' => 'a')
- r = @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'a')
+ r = @dashboard.wait_for(wfid)
assert_equal 'a', r['workitem']['fields']['result']
- wfid = @engine.launch(pdef, 'the_case' => 'b')
- r = @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'b')
+ r = @dashboard.wait_for(wfid)
assert_equal 'b', r['workitem']['fields']['result']
end
# The alternatives are bound inside of the case subprocess (definition)
#
@@ -56,16 +56,16 @@
end
subprocess 'case'
end
- wfid = @engine.launch(pdef, 'the_case' => 'a')
- r = @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'a')
+ r = @dashboard.wait_for(wfid)
assert_equal 'a', r['workitem']['fields']['result']
- wfid = @engine.launch(pdef, 'the_case' => 'b')
- r = @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'b')
+ r = @dashboard.wait_for(wfid)
assert_equal 'b', r['workitem']['fields']['result']
end
# /!\
#
@@ -86,16 +86,16 @@
end
subprocess 'a' # /!\
end
- wfid = @engine.launch(pdef, 'the_case' => 'a')
- r = @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'a')
+ r = @dashboard.wait_for(wfid)
assert_equal 'a', r['workitem']['fields']['result']
- wfid = @engine.launch(pdef, 'the_case' => 'b')
- r = @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'b')
+ r = @dashboard.wait_for(wfid)
assert_equal 'a', r['workitem']['fields']['result']
end
# Works as well, but the cases are bound in the global/process scope
#
@@ -118,17 +118,17 @@
end
subprocess 'a'
end
- wfid = @engine.launch(pdef, 'the_case' => 'a')
- @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'a')
+ @dashboard.wait_for(wfid)
assert_equal %w[ a global_a ], @tracer.to_a
@tracer.clear
- wfid = @engine.launch(pdef, 'the_case' => 'b')
- @engine.wait_for(wfid)
+ wfid = @dashboard.launch(pdef, 'the_case' => 'b')
+ @dashboard.wait_for(wfid)
assert_equal %w[ b global_a ], @tracer.to_a
end
end