Sha256: 5703cbf14896d96f53b7bb08d3cd97b7c54d40a4785440e250e06bb6f0970c6b
Contents?: true
Size: 763 Bytes
Versions: 3
Compression:
Stored size: 763 Bytes
Contents
## ruby -Itest -Ilib test/state_object_values_class_test.rb require 'test_helper' class StateObjectUnderTest < StateObjects::Base begin state_object_values :green, 'G' rescue RuntimeError => ex @@ex_incomplete_values = ex end def self.ex_incomplete_values @@ex_incomplete_values end end class StateObjectValuesClassTest < Test::Unit::TestCase def setup @model = StateObjectUnderTest end def test_ex_incomplete_values assert_equal RuntimeError, StateObjectUnderTest.ex_incomplete_values.class assert_equal "#state_object_values Must have 3 arguments: symbol, db_value, label. For Example: state_object_values :red,'R','Dont Walk'", StateObjectUnderTest.ex_incomplete_values.message end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
state_objects-0.9.1 | test/state_object_values_class_test.rb |
state_objects-0.9.0 | test/state_object_values_class_test.rb |
state_objects-0.0.8 | test/state_object_values_class_test.rb |