File: helper_module_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 (17 lines) | stat: -rw-r--r-- 501 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')

class HelperModuleTest < Test::Unit::TestCase
  def setup
    @klass = Class.new
    @machine = StateMachine::Machine.new(@klass)
    @helper_module = StateMachine::HelperModule.new(@machine, :instance)
  end
  
  def test_should_not_have_a_name
    assert_equal '', @helper_module.name.to_s
  end
  
  def test_should_provide_human_readable_to_s
    assert_equal "#{@klass} :state instance helpers", @helper_module.to_s
  end
end