Permalink
Browse files

+ state

  • Loading branch information...
floere committed Jun 8, 2011
1 parent 8816a18 commit 13cc3d37f57e8959bf9c9d60df070db5a861e478
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/james/state_api.rb
  2. +2 −2 test/unit/lib/james/state_test.rb
View
@@ -43,7 +43,7 @@ def initialize name, context
#
def hear transitions
transitions = { transitions => name } unless transitions.respond_to?(:to_hash)
- @transitions = @transitions.merge expand(transitions)
+ @transitions = expand(transitions).merge @transitions
end
# Execute this block or say the text when entering this state.
@@ -224,12 +224,12 @@ def state_for name
end
describe 'phrases' do
it '' do
- assert_equal ['transition one', 'transition two', 'transition three'], state.expects
+ assert_equal ['transition three', 'transition one', 'transition two'], state.expects
end
end
describe 'to_s' do
it '' do
- assert_equal 'James::State(some_name, some_context, {"transition one"=>:next_state1, "transition two"=>:next_state2, "transition three"=>:next_state3})', state.to_s
+ assert_equal 'James::State(some_name, some_context, {"transition three"=>:next_state3, "transition one"=>:next_state1, "transition two"=>:next_state2})', state.to_s
end
end
it '' do

0 comments on commit 13cc3d3

Please sign in to comment.