Sha256: 4fc3df214c74d50a87f52092c4e8013393faf5b6d811619023f831e763d551a7
Contents?: true
Size: 647 Bytes
Versions: 6
Compression:
Stored size: 647 Bytes
Contents
RSpec::Matchers.define :trigger_event do |event| match do |command| # PassiveRecord.drop_all Simulation.current.clear! Simulation.current.apply(command) Simulation.current.events.include?(event) end failure_message do |command| "expected that #{command.inspect} would trigger #{event.inspect}! Actual events were: #{Simulation.current.events}" end end RSpec::Matchers.define :trigger_events do |*events| match do |command| # PassiveRecord.drop_all Simulation.current.clear! Simulation.current.apply(command) events.all? do |event| Simulation.current.events.include?(event) end end end
Version data entries
6 entries across 6 versions & 1 rubygems