Sha256: 7f3626c2704663ffa594cf5500a610b86e1a1afe321ccb02d1cb85b409251aee

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

#
# testing ruote
#
# Wed Jan 26 09:21:06 JST 2011
#

require File.join(File.dirname(__FILE__), %w[ .. test_helper.rb ])

require 'ostruct'
require 'ruote'
require 'ruote/svc/participant_list'


class UtSvcParticipantListTest < Test::Unit::TestCase

  class FakeStorage
    def initialize
      @count = -1
    end
    def put(doc)
      @count = @count + 1
      return true if @count == 0
      nil
    end
    def get_configuration(whatever)
      { 'list' => [] }
    end
  end

  # Fighting issue #20 found by 'sandbox'
  #
  # https://github.com/jmettraux/ruote/issues#issue/20
  #
  def test_register_participant_fail_and_retry

    con = OpenStruct.new(:storage => FakeStorage.new)

    pl = Ruote::ParticipantList.new(con)

    pl.register('toto', Ruote::NullParticipant, { :hello => :world }, nil)

    assert true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-maestrodev-2.2.1 test/unit/ut_21_svc_participant_list.rb