TeensyMud - 'A ruby mud server.'

Browse repository
back

test_properties.rb

# Code Generated by ZenTest v. 2.3.0
# classname: asrt / meth = ratio%
# Filter: 3 / 4 = 75.00%

unless defined? $ZENTEST and $ZENTEST
require 'test/unit'
require 'flexmock'
require 'pp'
load 'mockengine.rb'
require 'storage/properties'
end

class A
property :a, :b, :c
def initialize
@x = 1
@y = "I'm not saved"
self.a = "save me"
self.c = 929287
end
end

class TestProperties < Test::Unit::TestCase
def setup
$id = 0
end

def test_properties
a = A.new
assert_equal(1, a.id)
assert_equal({:id => 1, :a => "save me", :c => 929287}, a.instance_variable_get(:@props))
end

end