remove the last_object from chain

also tried to keep the first around as was done in space
partially to not have to add the consrtants seperately
didn't work, as chain gets broken
also this has to be redone anyway
This commit is contained in:
Torsten Ruger
2018-08-29 21:05:54 +03:00
parent c983dcf0eb
commit ea7f3c9653
5 changed files with 24 additions and 17 deletions

View File

@ -1,7 +1,7 @@
require_relative "helper"
module Parfait
class TestPage < ParfaitTest
class TestFactory < ParfaitTest
def setup
super
@ -18,12 +18,15 @@ module Parfait
end
def test_no_next
assert_nil @factory.next_object
assert_nil @factory.last_object
assert_nil @factory.reserve
end
def test_get_next_object
assert_equal Parfait::Integer , @factory.get_next_object.class
end
def test_first_is_reserve
@factory.get_next_object
assert_equal Parfait::Integer , @factory.reserve.class
end
def test_chain_length
count = 0
start = @factory.get_next_object