Sha256: 8b0bd4a3c909ca6174b30721f9ade44a0c65ca1dbeba7dd2b3ad48a572f7893f

Contents?: true

Size: 738 Bytes

Versions: 1

Compression:

Stored size: 738 Bytes

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Dec 10 18:02:59 JST 2007
#

require 'test/unit'

require 'openwfe/expool/expstorage'


class Vehicle
end
class Car < Vehicle
end
class Animal
end

class StorageTest < Test::Unit::TestCase

  #def setup
  #end

  #def teardown
  #end

  def test_class_accepted

    esb = Object.new
    class << esb
      include OpenWFE::ExpressionStorageBase
    end

    assert (esb.class_accepted?(Vehicle.new, nil, nil))
    assert (esb.class_accepted?(Vehicle.new, [ Vehicle ], nil))
    assert (not esb.class_accepted?(Vehicle.new, nil, [ Vehicle ]))

    assert (esb.class_accepted?(Car.new, [ Vehicle ], nil))
    assert (not esb.class_accepted?(Car.new, nil, [ Vehicle ]))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.19 test/storage_test.rb