def test_it_digests_oldest_eaten_thing(self): carnivore = Carnivore() carnivore.eat(1) carnivore.eat(2) carnivore.eat(3) carnivore.digest() carnivore.stomach |should| equal_to([2, 3]) carnivore.digest() carnivore.stomach |should| equal_to([3]) carnivore.eat(4) carnivore.digest() carnivore.stomach |should| equal_to([4])
def test_it_eats_anything(self): carnivore = Carnivore() carnivore.eat(1) carnivore.eat(map) carnivore.eat({'i am': 'uneatable'}) carnivore.eat(object) carnivore.eat(range(100)) carnivore.eat(carnivore) carnivore.stomach |should| equal_to([ 1, map, {'i am': 'uneatable'}, object, range(100), carnivore])