You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, there are no tests that check to see that the flash is getting set at all (let alone, properly).
If I take a proper solution and substitute this code for the guess method in app.rb, all the tests still pass:
# Use existing methods in HangpersonGame to process a guess.# If a guess is repeated, set flash[:message] to "You have already used that letter."# If a guess is invalid, set flash[:message] to "Invalid guess."post'/guess'dobeginletter=params[:guess].to_s[0]#this code was given#flash[:message] = "You have already used that letter." if ! @game.guess(letter)valid=@game.guess(letter)rescueArgumentError#flash[:message] = "Invalid guess."endredirect'/show'end
The text was updated successfully, but these errors were encountered:
Apparently, there are no tests that check to see that the flash is getting set at all (let alone, properly).
If I take a proper solution and substitute this code for the guess method in app.rb, all the tests still pass:
The text was updated successfully, but these errors were encountered: