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.6.6 test/units/test_property.rb
mls-0.6.5 test/units/test_property.rb
mls-0.6.4 test/units/test_property.rb
mls-0.6.3 test/units/test_property.rb
mls-0.6.2 test/units/test_property.rb
mls-0.6.1 test/units/test_property.rb
mls-0.6.0 test/units/test_property.rb
mls-0.5.12 test/units/test_property.rb
mls-0.5.11 test/units/test_property.rb
mls-0.5.10 test/units/test_property.rb
mls-0.5.9 test/units/test_property.rb
mls-0.5.8 test/units/test_property.rb
mls-0.5.7 test/units/test_property.rb
mls-0.5.6 test/units/test_property.rb
mls-0.5.5 test/units/test_property.rb
mls-0.5.4 test/units/test_property.rb
mls-0.5.3 test/units/test_property.rb
mls-0.5.2 test/units/test_property.rb
mls-0.5.1 test/units/test_property.rb
mls-0.5.0 test/units/test_property.rb