Sha256: a349aeccd24dca7f0bbe48e1d732ade992aae50b42a387dbf6065922c3000b83

Contents?: true

Size: 891 Bytes

Versions: 47

Compression:

Stored size: 891 Bytes

Contents

#! /usr/bin/ruby
#encoding: utf-8

require 'test/unit'
require 'shoulda'

class LocalObjectTest < Test::Unit::TestCase
  context "Object" do
    setup do
      require 'y_support/local_object'
    end

    should "have constructor #LocalObject, alias #L!" do
      assert_equal LocalObject, LocalObject().class
      assert_equal LocalObject, L!.class
    end

    should "have #local_object?, alias #ℓ?" do
      assert_equal false, Object.new.local_object?
      assert_equal false, Object.new.ℓ?
    end
  end # context Object
  
  context "LocalObject" do
    setup do
      require 'y_support/local_object'
    end

    should "exist and comply" do
      n = LocalObject.new 'whatever'
      assert ! n.ℓ?
      assert n.ℓ? 'whatever'
      assert_equal 'whatever', n.signature
      assert_equal 'whatever', n.σ
    end
  end # context LocalObject
end # class LocalObjectTest

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
y_support-2.1.5 test/local_object_test.rb
y_support-2.1.4 test/local_object_test.rb
y_support-2.1.3 test/local_object_test.rb
y_support-2.1.2 test/local_object_test.rb
y_support-2.1.1 test/local_object_test.rb
y_support-2.1.0 test/local_object_test.rb
y_support-2.0.43 test/local_object_test.rb
y_support-2.0.42 test/local_object_test.rb
y_support-2.0.41 test/local_object_test.rb
y_support-2.0.39 test/local_object_test.rb
y_support-2.0.38 test/local_object_test.rb
y_support-2.0.37 test/local_object_test.rb
y_support-2.0.36 test/local_object_test.rb
y_support-2.0.35 test/local_object_test.rb
y_support-2.0.34 test/local_object_test.rb
y_support-2.0.33 test/local_object_test.rb
y_support-2.0.31 test/local_object_test.rb
y_support-2.0.30 test/local_object_test.rb
y_support-2.0.29 test/local_object_test.rb
y_support-2.0.28 test/local_object_test.rb