The encounter_counter class instance method belongs to both the Ogre and Human class, according to the tests
Line 28: expect(human.encounter_counter).to eq(1)
Line 82: expect(ogre.encounter_counter).to eq(6)
While I guess in theory it could belong to both classes, I don't think that makes much sense. Instead, I think the intent here is for it to belong to the Human class only, which would make more sense than having it belong to the Ogre class only.
If that is the case, then line 82 can be changed to: expect(human.encounter_counter).to eq(6)
The
encounter_counter
class instance method belongs to both theOgre
andHuman
class, according to the testsLine 28:
expect(human.encounter_counter).to eq(1)
Line 82:
expect(ogre.encounter_counter).to eq(6)
While I guess in theory it could belong to both classes, I don't think that makes much sense. Instead, I think the intent here is for it to belong to the
Human
class only, which would make more sense than having it belong to theOgre
class only.If that is the case, then line 82 can be changed to:
expect(human.encounter_counter).to eq(6)