Sha256: 1b73c0dadd52aaf9a294c7a61617edd02dbf0a2e213fb12834f5aa337ff4b816
Contents?: true
Size: 732 Bytes
Versions: 2
Compression:
Stored size: 732 Bytes
Contents
# frozen_string_literal: true RSpec.describe FiniteMachine::EventsMap, '#inspect' do it "inspects empty events map" do events_map = described_class.new expect(events_map.inspect).to eq("<#FiniteMachine::EventsMap @events_map={}>") end it "inspect events map" do transition = double(:transition) events_map = described_class.new events_map.add(:validated, transition) expect(events_map.inspect).to eq("<#FiniteMachine::EventsMap @events_map=#{{validated: [transition]}}>") end it "prints events map" do transition = double(:transition) events_map = described_class.new events_map.add(:validated, transition) expect(events_map.to_s).to eq("#{{validated: [transition]}}") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
finite_machine-0.12.1 | spec/unit/events_map/inspect_spec.rb |
finite_machine-0.12.0 | spec/unit/events_map/inspect_spec.rb |