Sha256: d5442322e3c13f400e83cc43cee5e3ba1f5cecdbbe890dd7985b336afc2c8b34

Contents?: true

Size: 516 Bytes

Versions: 7

Compression:

Stored size: 516 Bytes

Contents

require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb')
require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1')

class TestWorkflowDefinition < Test::Unit::TestCase
  def test_function_task
    wf = Workflow.annonymous_workflow do
      self.name = "StringLength"
      def self.str_length(s)
        s.length
      end

      input :string, :string
      task :str_length => :integer
    end
    assert_equal 5, wf.job(:str_length, :string => "12345").run
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scout-gear-10.4.0 test/scout/workflow/test_definition.rb
scout-gear-10.3.0 test/scout/workflow/test_definition.rb
scout-gear-10.2.0 test/scout/workflow/test_definition.rb
scout-gear-10.1.0 test/scout/workflow/test_definition.rb
scout-gear-10.0.1 test/scout/workflow/test_definition.rb
scout-gear-9.1.0 test/scout/workflow/test_definition.rb
scout-gear-9.0.0 test/scout/workflow/test_definition.rb