Testing wrong
Closed this issue · 2 comments
context 'correctly' do
before :each do
@GAMe = HangpersonGame.new('garply')
@Valid = @game.guess('a')
end
it 'changes correct guess list' do
expect(@game.guesses).to eq('a')
expect(@game.wrong_guesses).to eq('')
end
it 'returns true' do
expect(@Valid).not_to be false
end
end
context 'incorrectly' do
before :each do
@GAMe = HangpersonGame.new('garply')
@Valid = @game.guess('z')
end
it 'changes wrong guess list' do
expect(@game.guesses).to eq('')
expect(@game.wrong_guesses).to eq('z')
end
it 'returns true' do ###THIS Should be 'returns false'
expect(@Valid).not_to be false ##THIS should be .not_to be true
end
end
@HusainJaffer -
notice that further tests require that this method should return false only when a guess is duplicated
if you are a student of the MOOC you should have posted this on the edX forum
if you are a TA of the MOOC you should have discussed this with the other TAs in the slack chat to confirm that this really is a bug - in this case it is not - this is the intended behavior - lastly if it were a bug it would be reported on pivotal and not github