Sha256: dcb53926092cf03e7c2b305fae24c4f08f6bfa06bfd2c123c9d9f6f9e3ea3e9a

Contents?: true

Size: 528 Bytes

Versions: 10

Compression:

Stored size: 528 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe FiniteMachine::StateParser, "#inspect" do
  let(:object) { described_class }

  subject(:parser) { object.new(attrs) }

  describe '#inspect' do
    let(:attrs) { { green: :yellow } }

    it "inspects parser" do
      expect(parser.inspect).to eq("<#FiniteMachine::StateParser @attrs=green:yellow>")
    end
  end

  describe '#to_s' do
    let(:attrs) { { green: :yellow } }

    it "prints parser attributes" do
      expect(parser.to_s).to eq(attrs.to_s)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
finite_machine-0.10.0 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.9.2 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.9.1 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.9.0 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.8.1 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.8.0 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.7.1 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.7.0 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.6.1 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.6.0 spec/unit/state_parser/inspect_spec.rb