test/test_state_transition.rb in transitions-0.0.4 vs test/test_state_transition.rb in transitions-0.0.5
- old
+ new
@@ -1,41 +1,41 @@
require "helper"
class TestStateTransition < Test::Unit::TestCase
test "should set from, to, and opts attr readers" do
opts = {:from => "foo", :to => "bar", :guard => "g"}
- st = StateMachine::StateTransition.new(opts)
+ st = Transitions::StateTransition.new(opts)
assert_equal opts[:from], st.from
assert_equal opts[:to], st.to
assert_equal opts, st.options
end
test "should pass equality check if from and to are the same" do
opts = {:from => "foo", :to => "bar", :guard => "g"}
- st = StateMachine::StateTransition.new(opts)
+ st = Transitions::StateTransition.new(opts)
obj = stub
obj.stubs(:from).returns(opts[:from])
obj.stubs(:to).returns(opts[:to])
assert_equal st, obj
end
test "should fail equality check if from are not the same" do
opts = {:from => "foo", :to => "bar", :guard => "g"}
- st = StateMachine::StateTransition.new(opts)
+ st = Transitions::StateTransition.new(opts)
obj = stub
obj.stubs(:from).returns("blah")
obj.stubs(:to).returns(opts[:to])
assert_not_equal st, obj
end
test "should fail equality check if to are not the same" do
opts = {:from => "foo", :to => "bar", :guard => "g"}
- st = StateMachine::StateTransition.new(opts)
+ st = Transitions::StateTransition.new(opts)
obj = stub
obj.stubs(:from).returns(opts[:from])
obj.stubs(:to).returns("blah")