Sha256: 91294218c4ba418923e415596fbd8804da3b40960bfb7a59f4a7018b53567e2a
Contents?: true
Size: 704 Bytes
Versions: 8
Compression:
Stored size: 704 Bytes
Contents
require 'pathname' require Pathname(__FILE__).dirname.expand_path.parent.parent + 'spec_helper' module EventHelper def new_event(*args) DataMapper::Is::StateMachine::Data::Event.new(*args) end end describe DataMapper::Is::StateMachine::Data::Event do include EventHelper before(:each) do @machine = mock("machine") @event = new_event(:ping, @machine) end it "#initialize should work" do @event.name.should == :ping @event.machine.should == @machine @event.transitions.should == [] end it "#add_transition should work" do @event.add_transition(:nothing, :pinged) @event.transitions.should == [{:from => :nothing, :to => :pinged }] end end
Version data entries
8 entries across 8 versions & 1 rubygems