Sha256: 00ad49a8d943a6389619adcede9695f39e49acf836a3d106b9c67ec648cf6927

Contents?: true

Size: 534 Bytes

Versions: 6

Compression:

Stored size: 534 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

RSpec.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

6 entries across 6 versions & 1 rubygems

Version Path
finite_machine-0.11.3 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.11.2 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.11.1 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.11.0 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.10.2 spec/unit/state_parser/inspect_spec.rb
finite_machine-0.10.1 spec/unit/state_parser/inspect_spec.rb