class DataMapperTest::MachineWithNonColumnStateAttributeUndefinedTest

Public Class Methods

new() click to toggle source
Calls superclass method
# File test/unit/integrations/data_mapper_test.rb, line 400
def initialize
  # Skip attribute initialization
  @initialized_state_machines = true
  super
end

Public Instance Methods

setup() click to toggle source
# File test/unit/integrations/data_mapper_test.rb, line 398
def setup
  @resource = new_resource do
    def initialize
      # Skip attribute initialization
      @initialized_state_machines = true
      super
    end
  end
  
  @machine = StateMachine::Machine.new(@resource, :status, :initial => 'parked')
  @record = @resource.new
end
test_should_define_a_new_property_for_the_attribute() click to toggle source
# File test/unit/integrations/data_mapper_test.rb, line 411
def test_should_define_a_new_property_for_the_attribute
  assert_not_nil @resource.properties[:status]
end
test_should_define_a_reader_attribute_for_the_attribute() click to toggle source
# File test/unit/integrations/data_mapper_test.rb, line 415
def test_should_define_a_reader_attribute_for_the_attribute
  assert @record.respond_to?(:status)
end
test_should_define_a_writer_attribute_for_the_attribute() click to toggle source
# File test/unit/integrations/data_mapper_test.rb, line 419
def test_should_define_a_writer_attribute_for_the_attribute
  assert @record.respond_to?(:status=)
end
test_should_define_an_attribute_predicate() click to toggle source
# File test/unit/integrations/data_mapper_test.rb, line 423
def test_should_define_an_attribute_predicate
  assert @record.respond_to?(:status?)
end