Sha256: dc889e4edc5a95302006e130d06db96211c999bf3cb343f57d20528b0128f46f

Contents?: true

Size: 655 Bytes

Versions: 3

Compression:

Stored size: 655 Bytes

Contents

#
# testing ruote
#
# Tue Jun 23 10:55:16 JST 2009
#

require File.join(File.dirname(__FILE__), 'base')


class FtLaunchitemTest < Test::Unit::TestCase
  include FunctionalBase

  def test_launch

    pdef = Ruote.process_definition do
      alpha
    end

    fields = nil

    @engine.register_participant :alpha do |workitem|
      fields = workitem.fields
      @tracer << 'a'
      nil
    end

    #noisy

    wfid = @engine.launch(pdef, 'a' => 0, 'b' => 1)
    wait_for(wfid)

    assert_equal('a', @tracer.to_s)

    assert_not_nil(fields.delete('dispatched_at'))
    assert_equal({"a"=>0, "b"=>1, "params"=>{"ref"=>"alpha"}}, fields)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruote-2.1.11 test/functional/ft_12_launchitem.rb
ruote-2.1.10 test/functional/ft_12_launchitem.rb
ruote-2.1.9 test/functional/ft_12_launchitem.rb