File: invalid_event_test.rb

package info (click to toggle)
ruby-state-machine 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,764 kB
  • ctags: 6,623
  • sloc: ruby: 26,008; makefile: 11
file content (20 lines) | stat: -rw-r--r-- 545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')

class InvalidEventTest < Test::Unit::TestCase
  def setup
    @object = Object.new
    @invalid_event = StateMachine::InvalidEvent.new(@object, :invalid)
  end
  
  def test_should_have_an_object
    assert_equal @object, @invalid_event.object
  end
  
  def test_should_have_an_event
    assert_equal :invalid, @invalid_event.event
  end
  
  def test_should_generate_a_message
    assert_equal ':invalid is an unknown state machine event', @invalid_event.message
  end
end