Sha256: 533d41d7e992180cf9070d5901f2ebb9740554d424dec106e37ef23666ec0262

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

require 'rubygems'
require 'test/unit'
require File.join(File.dirname(__FILE__),'..','lib','uid_attribute')

class Model
  include UIDAttribute
  attr_accessor :uid
end

class UidAttribueTest < Test::Unit::TestCase
  def setup
    @model = Model.new
    assert @model.class.uid_attr
  end

  def test_uid_attr
    assert !@model.send(@model.class.uid_attr).nil?
  end

  def test_object_uid_attr
    Model.uid_object = true
    assert !@model.send(@model.class.uid_attr).nil?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uid_attribute-0.2.7 test/uid_attribute_test.rb