Sha256: ea38990d09b27945b51cbad1793f9fe8c69172f4a77fc679fba6184440beb10a

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

#
# testing ruote
#
# Wed Jun 29 07:42:42 JST 2011
#

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


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

  class SolParticipant
    include Ruote::LocalParticipant
    def on_workitem
      @context.tracer << stash_get(fexp.root_id, 'lost')
      @context.tracer << "\n" + (get('lost') || 'nada')
      reply
    end
  end

  def test_stash_on_launch

    @dashboard.register { sally SolParticipant }

    #@dashboard.noisy = true

    wfid = @dashboard.launch(Ruote.define do
      sally
    end,
    {}, # workitem fields
    {}, # process variables
    { 'lost' => 'wallet' }) # root stash

    r = @dashboard.wait_for(wfid)

    assert_equal "wallet\nnada", @tracer.to_s
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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