Sha256: 207a5be37568cffebcadeb9f0033e0b97afd111d67f34a4d3fbb9708fb9e3a56

Contents?: true

Size: 806 Bytes

Versions: 8

Compression:

Stored size: 806 Bytes

Contents

#
# testing ruote
#
# Mon Jun 15 12:58:12 JST 2009
#

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

require 'ruote/part/hash_participant'


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

  def test_redo

    pdef = Ruote.process_definition do
      sequence :tag => 'seq' do
        alpha
        _redo :ref => 'seq'
      end
    end

    alpha = @engine.register_participant :alpha, Ruote::HashParticipant.new

    #noisy

    wfid = @engine.launch(pdef)
    wait_for(:alpha)

    alpha.reply(alpha.first)
    wait_for(:alpha)

    alpha.reply(alpha.first)
    wait_for(:alpha)

    ps = @engine.process(wfid)

    assert_equal 0, ps.errors.size
    assert_equal 3, ps.expressions.size

    assert_equal 3, logger.log.select { |e| e['action'] == 'entered_tag' }.size
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruote-2.1.11 test/functional/eft_9_redo.rb
ruote-2.1.10 test/functional/eft_9_redo.rb
ruote-2.1.9 test/functional/eft_9_redo.rb
ruote-2.1.8 test/functional/eft_9_redo.rb
ruote-2.1.7 test/functional/eft_9_redo.rb
ruote-2.1.6 test/functional/eft_9_redo.rb
ruote-2.1.5 test/functional/eft_9_redo.rb
ruote-2.1.4 test/functional/eft_9_redo.rb