test/ft_29_httprb.rb in ruote-0.9.18 vs test/ft_29_httprb.rb in ruote-0.9.19

- old
+ new

@@ -1,8 +1,8 @@ # -# Testing OpenWFE +# Testing OpenWFEru (Ruote) # # John Mettraux at openwfe.org # # Mon Oct 9 22:19:44 JST 2006 # @@ -15,92 +15,92 @@ require 'flowtestbase' class FlowTest29 < Test::Unit::TestCase - include FlowTestBase + include FlowTestBase - #def teardown - #end + #def teardown + #end - def setup - super - @engine.ac[:remote_definitions_allowed] = true - end + def setup + super + @engine.ac[:remote_definitions_allowed] = true + end - DEFHOST = "http://openwferu.rubyforge.org/defs" + DEFHOST = "http://openwferu.rubyforge.org/defs" - # - # TEST 0 + # + # TEST 0 - def test_httprb_0 + def test_httprb_0 - li = OpenWFE::LaunchItem.new - li.wfdurl = "#{DEFHOST}/testdef.rb" + li = OpenWFE::LaunchItem.new + li.wfdurl = "#{DEFHOST}/testdef.rb" - dotest li, %w{ a b c }.join("\n") - end + dotest li, %w{ a b c }.join("\n") + end - # - # TEST 1 + # + # TEST 1 - class MainDefinition1 < OpenWFE::ProcessDefinition - sequence do - _print "A" - subprocess :ref => "#{DEFHOST}/testdef.rb" - _print "C" - end + class MainDefinition1 < OpenWFE::ProcessDefinition + sequence do + _print "A" + subprocess :ref => "#{DEFHOST}/testdef.rb" + _print "C" end + end - def test_httprb_1 + def test_httprb_1 - dotest MainDefinition1, %w{ A a b c C }.join("\n") - end + dotest MainDefinition1, %w{ A a b c C }.join("\n") + end - # - # TEST 2 + # + # TEST 2 - class MainDefinition2 < OpenWFE::ProcessDefinition - def make - sequence do - _print "-1" - subprocess :ref => "#{DEFHOST}/testdef.xml" - _print "3" - end - end + class MainDefinition2 < OpenWFE::ProcessDefinition + def make + sequence do + _print "-1" + subprocess :ref => "#{DEFHOST}/testdef.xml" + _print "3" + end end + end - def test_httprb_2 + def test_httprb_2 - dotest MainDefinition2, %w{ -1 0 1 2 3 }.join("\n") - end + dotest MainDefinition2, %w{ -1 0 1 2 3 }.join("\n") + end - # - # TEST 3 + # + # TEST 3 - def test_httprb_3 + def test_httprb_3 - @engine.ac.delete(:remote_definitions_allowed) - # - # relocking + @engine.ac.delete(:remote_definitions_allowed) + # + # relocking - li = OpenWFE::LaunchItem.new - li.wfdurl = "#{DEFHOST}/testdef.rb" + li = OpenWFE::LaunchItem.new + li.wfdurl = "#{DEFHOST}/testdef.rb" - e = nil + e = nil - begin - dotest(li, "") - rescue Exception => e - end + begin + dotest(li, "") + rescue Exception => e + end - #puts e + #puts e - assert_not_nil e - assert_equal e.to_s, ":remote_definitions_allowed is set to false" - end + assert_not_nil e + assert_equal e.to_s, ":remote_definitions_allowed is set to false" + end end