test/functional/ft_11_recursion.rb in ruote-2.2.0 vs test/functional/ft_11_recursion.rb in ruote-2.3.0
- old
+ new
@@ -3,11 +3,11 @@
# testing ruote
#
# Sat Jun 13 22:43:16 JST 2009
#
-require File.join(File.dirname(__FILE__), 'base')
+require File.expand_path('../base', __FILE__)
require 'ruote/part/local_participant'
class FtRecursionTest < Test::Unit::TestCase
@@ -37,31 +37,31 @@
end
end
def test_main_recursion
- @engine.context.stash[:wfids] = []
+ @dashboard.context.stash[:wfids] = []
pdef = Ruote.process_definition :name => 'def0' do
sequence do
alpha
def0
end
end
- alpha = @engine.register_participant :alpha, CountingParticipant
+ alpha = @dashboard.register_participant :alpha, CountingParticipant
#noisy
assert_trace(%w[ 1 2 3 4 5 6 ], pdef)
- assert_equal 6, @engine.context.stash[:wfids].uniq.size
+ assert_equal 6, @dashboard.context.stash[:wfids].uniq.size
end
def test_sub_recursion
- @engine.context.stash[:wfids] = []
+ @dashboard.context.stash[:wfids] = []
pdef = Ruote.process_definition do
define 'sub0' do
sequence do
alpha
@@ -69,19 +69,19 @@
end
end
sub0
end
- alpha = @engine.register_participant :alpha, CountingParticipant
+ alpha = @dashboard.register_participant :alpha, CountingParticipant
#noisy
assert_trace %w[ 1 2 3 4 5 6 ], pdef
#p alpha.wfids.uniq
- assert_equal 6, @engine.context.stash[:wfids].uniq.size
+ assert_equal 6, @dashboard.context.stash[:wfids].uniq.size
end
def test_forgotten_main_recursion
pdef = Ruote.process_definition :name => 'def0' do
@@ -91,14 +91,14 @@
def0
end
end
end
- alpha = @engine.register_participant :alpha, CountingParticipant
+ alpha = @dashboard.register_participant :alpha, CountingParticipant
#noisy
- wfid = @engine.launch(pdef)
+ wfid = @dashboard.launch(pdef)
6.times { wait_for(:alpha) }
wait_for(1)