Sha256: 5a6a46e4623d0223f9c19175a0d097753ac4ce6a3e46e311fe2d893a53742d8e

Contents?: true

Size: 401 Bytes

Versions: 4

Compression:

Stored size: 401 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe FiniteMachine::EventsChain, '#clear' do
  let(:object)  { described_class }

  let(:machine) { double(:machine) }

  subject(:chain) { object.new(machine) }

  it "clears chain events" do
    event = double(:event)
    chain.add(:validated, event)
    expect(chain.empty?).to be(false)

    chain.clear
    expect(chain.empty?).to be(true)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
finite_machine-0.10.0 spec/unit/events_chain/check_choice_conditions_spec.rb
finite_machine-0.9.2 spec/unit/events_chain/check_choice_conditions_spec.rb
finite_machine-0.9.1 spec/unit/events_chain/check_choice_conditions_spec.rb
finite_machine-0.9.0 spec/unit/events_chain/check_choice_conditions_spec.rb