Sha256: df78e1fb855ad61652c39c7f1530c1ad3724c5e7e3e20e874530d6092f10ebdd

Contents?: true

Size: 671 Bytes

Versions: 4

Compression:

Stored size: 671 Bytes

Contents

#
# testing ruote
#
# Mon Sep  3 06:29:08 JST 2012
#

require File.expand_path('../base', __FILE__)


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

  class MyParticipant < Ruote::Participant
    def on_workitem
      (workitem.fields['seen'] ||= []) << workitem.participant_name
      reply
    end
  end

  def test_participant

    @dashboard.register '.+', MyParticipant

    pdef = Ruote.process_definition do
      alpha
      bravo
    end

    wfid = @dashboard.launch(pdef)
    r = @dashboard.wait_for(wfid)

    assert_equal 'terminated', r['action']
    assert_equal %w[ alpha bravo ], r['workitem']['fields']['seen']
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruote-2.3.0.3 test/functional/ft_78_part_participant.rb
ruote-2.3.0.2 test/functional/ft_78_part_participant.rb
ruote-2.3.0.1 test/functional/ft_78_part_participant.rb
ruote-2.3.0 test/functional/ft_78_part_participant.rb