class RubyEventStore::RSpec::ExpectedCollection
Attributes
count[R]
events[R]
Public Class Methods
new(events)
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 4 def initialize(events) @events = events @strict = false end
Public Instance Methods
empty?()
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 15 def empty? events.empty? end
event()
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 35 def event raise NotSupported if !events.size.equal?(1) events.first end
exactly(count)
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 9 def exactly(count) raise NotSupported if !events.size.equal?(1) raise NotSupported if count < 1 @count = count end
once()
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 19 def once exactly(1) end
specified_count?()
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 23 def specified_count? !count.nil? end
strict()
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 27 def strict @strict = true end
strict?()
click to toggle source
# File lib/ruby_event_store/rspec/expected_collection.rb, line 31 def strict? @strict end