Sha256: 76097c317ee8f6e613ac7484fbef914396fa34650d3da652db70c7bdcd4bd06c

Contents?: true

Size: 544 Bytes

Versions: 8

Compression:

Stored size: 544 Bytes

Contents

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

describe "StateDsl" do

  describe "state" do

    before(:each) do
      class Earth
        extend DataMapper::Is::StateMachine::StateDsl
        stub!(:state_machine_context?).and_return(true)
      end
      machine = mock("machine", :states => [])
      Earth.instance_variable_set(:@is_state_machine, { :machine => machine })
    end

    it "declaration should succeed" do
      class Earth
        state :day
      end
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

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