Skip to content

Instantly share code, notes, and snippets.

@zankich
Created February 21, 2013 23:48
Show Gist options
  • Select an option

  • Save zankich/5009544 to your computer and use it in GitHub Desktop.

Select an option

Save zankich/5009544 to your computer and use it in GitHub Desktop.
class CodeBreaker
def evaluate_guess(colors)
[]
end
end
require "./code_breaker"
describe CodeBreaker do
it "should load codebreaker" do
c = CodeBreaker.new
c.nil?.should eq(false)
end
specify "no matches return empty array" do
c = CodeBreaker.new
matches = c.evaluate_guess([:red, :green, :blue, :yellow])
matches.should eq([])
end
specify "matches one place" do
c = CodeBreaker.new
matches = c.evaluate_guess([:red, :green, :blue, :yellow])
matches.should eq([:place])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment