test/ft_33_description.rb in ruote-0.9.18 vs test/ft_33_description.rb in ruote-0.9.19
- old
+ new
@@ -12,96 +12,96 @@
require 'openwfe/def'
require 'flowtestbase'
class FlowTest33 < Test::Unit::TestCase
- include FlowTestBase
+ include FlowTestBase
- #def teardown
- #end
+ #def teardown
+ #end
- #def setup
- #end
+ #def setup
+ #end
- #
- # TEST 0
+ #
+ # TEST 0
- class TestDefinition0 < OpenWFE::ProcessDefinition
- description "nada"
- _print "${description}"
- end
+ class TestDefinition0 < OpenWFE::ProcessDefinition
+ description "nada"
+ _print "${description}"
+ end
- def test_0
+ def test_0
- dotest TestDefinition0, "nada"
- end
+ dotest TestDefinition0, "nada"
+ end
- #
- # TEST 1
+ #
+ # TEST 1
- def test_1
- dotest("""<process-definition name='test_1' revision='x'>
- <description>nada</description>
- <print>${description}</print>
+ def test_1
+ dotest("""<process-definition name='test_1' revision='x'>
+ <description>nada</description>
+ <print>${description}</print>
</process-definition>
""", "nada")
- end
+ end
- #
- # TEST 2
+ #
+ # TEST 2
- class TestDefinition2 < OpenWFE::ProcessDefinition
- description :lang => "fr" do "nada" end
- sequence do
- _print "${description}"
- _print "${description__fr}"
- end
+ class TestDefinition2 < OpenWFE::ProcessDefinition
+ description :lang => "fr" do "nada" end
+ sequence do
+ _print "${description}"
+ _print "${description__fr}"
end
+ end
- def test_2
+ def test_2
- dotest TestDefinition2, "nada\nnada"
- end
+ dotest TestDefinition2, "nada\nnada"
+ end
- #
- # TEST 3
+ #
+ # TEST 3
- class TestDefinition3 < OpenWFE::ProcessDefinition
- description "nothing"
- description :lang => "es" do "nada" end
- sequence do
- _print "${description}"
- _print "${description__es}"
- end
+ class TestDefinition3 < OpenWFE::ProcessDefinition
+ description "nothing"
+ description :lang => "es" do "nada" end
+ sequence do
+ _print "${description}"
+ _print "${description__es}"
end
+ end
- def test_3
+ def test_3
- dotest TestDefinition3, "nothing\nnada"
- end
+ dotest TestDefinition3, "nothing\nnada"
+ end
- #
- # TEST 4
+ #
+ # TEST 4
- def test_4
+ def test_4
- @engine.register_participant :check do |fexp, wi|
- @tracer << fexp.lookup_variable('description').class.name
- @tracer << "\n"
- end
+ @engine.register_participant :check do |fexp, wi|
+ @tracer << fexp.lookup_variable('description').class.name
+ @tracer << "\n"
+ end
- dotest(
+ dotest(
"""<process-definition name='test_1' revision='x'>
- <description language='en'>nothing</description>
- <description language='es'>nada</description>
- <sequence>
- <participant ref='check' />
- <print>${description}</print>
- <print>${description__en}</print>
- <print>${description__es}</print>
- </sequence>
+ <description language='en'>nothing</description>
+ <description language='es'>nada</description>
+ <sequence>
+ <participant ref='check' />
+ <print>${description}</print>
+ <print>${description__en}</print>
+ <print>${description__es}</print>
+ </sequence>
</process-definition>""",
- "String\nnothing\nnothing\nnada")
- end
+ "String\nnothing\nnothing\nnada")
+ end
end