test/functional/eft_2_sequence.rb in ruote-2.2.0 vs test/functional/eft_2_sequence.rb in ruote-2.3.0
- old
+ new
@@ -3,11 +3,11 @@
# testing ruote
#
# Sat Jan 24 22:40:35 JST 2009
#
-require File.join(File.dirname(__FILE__), 'base')
+require File.expand_path('../base', __FILE__)
class EftSequenceTest < Test::Unit::TestCase
include FunctionalBase
@@ -30,11 +30,11 @@
echo 'a'
echo 'b'
end
end
- #noisy
+ #@dashboard.noisy = true
assert_trace("a\nb", pdef)
end
def test_alice_bob_sequence
@@ -44,15 +44,34 @@
participant :ref => 'alice'
participant :ref => 'bob'
end
end
- @engine.register_participant '.+' do |workitem|
- @tracer << workitem.participant_name + "\n"
+ @dashboard.register_participant '.+' do |workitem|
+ context.tracer << workitem.participant_name + "\n"
end
#noisy
assert_trace("alice\nbob", pdef)
+ end
+
+ # Fri Dec 24 15:35:17 JST 2010
+ #
+ def test_let
+
+ pdef = Ruote.process_definition do
+ set 'v:var' => 'val'
+ echo "out:${v:var}"
+ let do
+ set 'v:var' => 'val1'
+ echo "in:${v:var}"
+ end
+ echo "out:${v:var}"
+ end
+
+ #noisy
+
+ assert_trace %w[ out:val in:val1 out:val ], pdef
end
end