Sha256: cd241736b86f32e892d3cc80211263b2802982144c13c4e3a85eb4028cbb6317
Contents?: true
Size: 889 Bytes
Versions: 12
Compression:
Stored size: 889 Bytes
Contents
require 'test_helper' class CfEventPollerTest < Test::Unit::TestCase def setup @cf = CFStub.new @poller = EbDeployer::EventPoller.new(EbDeployer::CfEventSource.new("mystack", @cf)) end def test_run_handle_block_through_all_events_when_there_is_no_from_anchor messages_handled = [] @cf.set_events('mystack', ['a', 'b', nil]) @poller.poll(nil) do |event| break if event.resource_status.nil? messages_handled << event.resource_status end assert_equal ['a', 'b'], messages_handled end def test_can_poll_all_events_after_an_anchor @cf.set_events('mystack', ['a', 'b'], ['c', 'd', nil]) anchor = @poller.get_anchor messages_handled = [] @poller.poll(anchor) do |event| break if event.resource_status.nil? messages_handled << event.resource_status end assert_equal ['c', 'd'], messages_handled end end
Version data entries
12 entries across 12 versions & 3 rubygems