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.11.3 test/units/test_property.rb
mls-0.11.2 test/units/test_property.rb
mls-0.11.1 test/units/test_property.rb
mls-0.11.0 test/units/test_property.rb
mls-0.9.9 test/units/test_property.rb
mls-0.9.8 test/units/test_property.rb
mls-0.9.6 test/units/test_property.rb
mls-0.9.5 test/units/test_property.rb
mls-0.9.4 test/units/test_property.rb
mls-0.9.3 test/units/test_property.rb
mls-0.9.2 test/units/test_property.rb
mls-0.9.1 test/units/test_property.rb
mls-0.9.0 test/units/test_property.rb
mls-0.8.2 test/units/test_property.rb
mls-0.8.1 test/units/test_property.rb
mls-0.8.0 test/units/test_property.rb
mls-0.7.2 test/units/test_property.rb
mls-0.7.1 test/units/test_property.rb
mls-0.7.0 test/units/test_property.rb
mls-0.6.7 test/units/test_property.rb