Sha256: e02b0d8d54e4e69a801ed9cfeaa062999e543dbd0e6e5aa9ba7a6a6b0e3d7c92

Contents?: true

Size: 714 Bytes

Versions: 8

Compression:

Stored size: 714 Bytes

Contents

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

describe "StateMachine" do

  describe "is_state_machine" do

    before(:each) do
      class Earth
        extend DataMapper::Is::StateMachine

        stub!(:properties).and_return([])
        stub!(:property)
        stub!(:before)

        stub!(:state_machine_context?).and_return(true)
        stub!(:push_state_machine_context)
        stub!(:pop_state_machine_context)
      end
    end

    it "declaration should succeed" do
      class Earth
        is_state_machine
      end
    end

  end
end

# is_state_machine
# push_state_machine_context(label)
# pop_state_machine_context
# state_machine_context?(label)

Version data entries

8 entries across 8 versions & 1 rubygems

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