spec/interact_spec.rb in mastermind-nowsiany-1.0.2 vs spec/interact_spec.rb in mastermind-nowsiany-1.0.3

- old
+ new

@@ -1,6 +1,7 @@ require 'mastermind/interact' +require 'mastermind/player' RSpec.describe Mastermind::Interact do before do @interact = Mastermind::Interact.new end @@ -27,11 +28,10 @@ it 'prints a round over message' do expect(@interact.print_round_over).to include("Round over") end it 'prints an invalid guess message' do - invalid_cmd = "XXXX" - expect(@interact.print_invalid_guess(invalid_cmd)).to include("not a valid") - expect(@interact.print_invalid_guess(invalid_cmd)).to include(invalid_cmd) + player = Mastermind::Player.new("Steve") + expect(@interact.print_invalid_guess(player)).to include("not a valid") end end