spec/99spec.rb in 99_game-1.2.1 vs spec/99spec.rb in 99_game-1.3.0

- old
+ new

@@ -15,17 +15,18 @@ end end end end end -describe "UserCard" do - describe "#num" do - for key in UserCard.new._num.keys - describe "#{key}" do - it "should == #{UserCard.new._num[key]}" do; - expect(UserCard.new(key.to_s).num).to eq UserCard.new._num[key] - end - end +describe "converter" do + context "when a number" do + it "should return the input as a number" do + expect(converter("5")).to eq 1 + end + end + context "when an abbreveation" do + it "should expand it" do + expect(converter("k")).to eq "King" end end end describe "Hand" do hand = Hand.new