Created
March 20, 2013 17:35
-
-
Save ichabodcole/5206684 to your computer and use it in GitHub Desktop.
Scrabble Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'minitest/spec' | |
require 'minitest/autorun' | |
require './scrabble.rb' | |
describe Scrabble do | |
describe "word_score" do | |
it "should return 14 if word is Cabbage" do | |
Scrabble.word_score("Cabbage").must_equal 14 | |
end | |
it "should return 51 if word is JazzQuiz" do | |
Scrabble.word_score("JazzQuiz").must_equal 51 | |
end | |
end | |
describe "letter_value method" do | |
it "should return 10 if letter is Q" do | |
Scrabble.letter_value("Q").must_equal 10 | |
end | |
it "should return 1 if letter is A" do | |
Scrabble.letter_value("A").must_equal 1 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment