Sha256: c906185d0b8b36501050c3d825ffa702c1d1afa16e64929d63b081f610cc28b9

Contents?: true

Size: 496 Bytes

Versions: 8

Compression:

Stored size: 496 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).dirname.expand_path.parent.parent + 'spec_helper'

module StateHelper
  def new_state(*args)
    DataMapper::Is::StateMachine::Data::State.new(*args)
  end
end

describe DataMapper::Is::StateMachine::Data::State do
  include StateHelper

  before(:each) do
    @machine = mock("machine")
    @state = new_state(:off, @machine)
  end

  it "#initialize should work" do
    @state.name.should    == :off
    @state.machine.should == @machine
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dm-is-state_machine-0.9.4 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.6 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.7 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.9 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.10 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.11 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.5 spec/unit/data/state_spec.rb
dm-is-state_machine-0.9.8 spec/unit/data/state_spec.rb