Sha256: 9539ef3d6e85174f669b02cce8d645fb6af5bb769228e1302e5b4af96ff9c27b

Contents?: true

Size: 1017 Bytes

Versions: 104

Compression:

Stored size: 1017 Bytes

Contents

require 'test_helper'

class TestProperty < ::Test::Unit::TestCase

  def test_DEFAULT_OPTIONS
    assert_equal :always, MLS::Property::DEFAULT_OPTIONS[:serialize]
  end

  def test_attr_readers
    property = MLS::Property.new(:name => "blah")

    assert property.respond_to?(:model)
    assert property.respond_to?(:name)
    assert property.respond_to?(:instance_variable_name)
    assert property.respond_to?(:options)
    assert property.respond_to?(:default)
    assert property.respond_to?(:reader_visibility)
    assert property.respond_to?(:writer_visibility)
  end

  def test_instance_methods
    property = MLS::Property.new(:name => "blah")

    assert property.respond_to?(:set_default_value)
    assert property.respond_to?(:determine_visibility)
  end

  def test_class_methods
    assert MLS::Property.respond_to?(:determine_class)
    assert MLS::Property.respond_to?(:inherited)
    assert MLS::Property.respond_to?(:demodulized_names)
    assert MLS::Property.respond_to?(:find_class)
  end

end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
mls-0.4.0 test/units/test_property.rb
mls-0.3.8 test/units/test_property.rb
mls-0.3.7 test/units/test_property.rb
mls-0.3.6 test/units/test_property.rb
mls-0.3.5 test/units/test_property.rb
mls-0.3.4 test/units/test_property.rb
mls-0.3.3 test/units/test_property.rb
mls-0.3.2 test/units/test_property.rb
mls-0.3.1 test/units/test_property.rb
mls-0.3.0 test/units/test_property.rb
mls-0.2.54 test/units/test_property.rb
mls-0.2.53 test/units/test_property.rb
mls-0.2.52 test/units/test_property.rb
mls-0.2.51 test/units/test_property.rb
mls-0.2.50 test/units/test_property.rb
mls-0.2.49 test/units/test_property.rb
mls-0.2.48 test/units/test_property.rb
mls-0.2.47 test/units/test_property.rb
mls-0.2.46 test/units/test_property.rb
mls-0.2.45 test/units/test_property.rb