Skip to content

Instantly share code, notes, and snippets.

View rishav's full-sized avatar

Rishav Rastogi rishav

View GitHub Profile
@rishav
rishav / quiz.rb
Created May 15, 2009 19:23 — forked from intinig/quiz.rb
# COMMUNITY CHALLENGE
#
# A little modification to @intinig solution ( to test the order as well )
# May not be the best way to solve the problem.
#
class Quiz
def initialize(input = STDIN, output = STDOUT)
@input = input
@output = output
end
# COMMUNITY CHALLENGE
#
# How would you test this Quiz#problem method? Only two rules:
#
# 1. No mocks or stubs allowed. I'm looking for a other alternatives.
# Mocks can get messy in complex scenarios, and this is intended to
# be a high level test which executes all code. I don't think mocking
# would be a very clean solution anyway, but if you want to try it
# and prove me wrong feel free.
#