Sha256: 8529d0372b1eabd4a0dde8708c9445914b1970f5cf3abea9d20a8362cb82d1b3
Contents?: true
Size: 584 Bytes
Versions: 19
Compression:
Stored size: 584 Bytes
Contents
module Minitest::Assertions def assert_event_allowed(object, event, options = {}) state_machine_name = options.fetch(:on, :default) assert object.aasm(state_machine_name).may_fire_event?(event), "Expected that the event :#{event} would be allowed (on :#{state_machine_name})" end def refute_event_allowed(object, event, options = {}) state_machine_name = options.fetch(:on, :default) refute object.aasm(state_machine_name).may_fire_event?(event), "Expected that the event :#{event} would not be allowed (on :#{state_machine_name})" end end
Version data entries
19 entries across 19 versions & 1 rubygems