Skip to content

Instantly share code, notes, and snippets.

@jcasimir
Created September 25, 2014 03:17
Show Gist options
  • Save jcasimir/7e595face5a2985fa286 to your computer and use it in GitHub Desktop.
Save jcasimir/7e595face5a2985fa286 to your computer and use it in GitHub Desktop.
manual stubbing
class Game
def get_input
gets.chomp
end
def play
unless get_input == "quit"
puts "Still Going"
end
return "done"
end
end
class GameTest < Minitest::Test
def test_it_exits
class Game
def get_input
"quit"
end
end
assert_equal "done", Game.new.play
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment