Permalink
Browse files

Rename tests with more descriptive names

  • Loading branch information...
camillebaldock committed Sep 4, 2014
1 parent 97921d0 commit 7663fbeb7d06c627f7b831a14d9cf4de34969c93
Showing with 15 additions and 15 deletions.
  1. +15 −15 spec/hand_spec.rb
View
@@ -45,60 +45,60 @@
end
end
describe "#pips_occurence_count" do
it "returns information about the winning potential of the hand" do
describe "#pips_occurrence_count" do
it "returns the correct pips occurrence count" do
expect(pair_hand.pips_occurence_count).to eq ({ 5 => 2, 6 => 1, 7 => 1, 8 => 1 }.values)
end
end
describe "#suit_occurence_count" do
it "returns information about the winning potential of the hand" do
describe "#suit_occurrence_count" do
it "returns the correct suit occurrence count" do
expect(pair_hand.suit_occurence_count).to eq ({ :heart => 1, :diamonds => 4 }.values)
end
end
describe "#rank" do
it "returns information about the winning potential of the hand" do
it "ranks a pair hand correctly" do
expect(pair_hand.rank).to eq ({:type => :pair})
end
it "returns information about the winning potential of the hand" do
it "ranks a high card hand correctly" do
expect(highest_hand.rank).to eq ({:type => :highest})
end
it "returns information about the winning potential of the hand" do
it "ranks a three of a kind hand correctly" do
expect(three_of_a_kind_hand.rank).to eq ({:type => :three_of_a_kind})
end
it "returns information about the winning potential of the hand" do
it "ranks a four of a kind hand correctly" do
expect(four_of_a_kind_hand.rank).to eq ({:type => :four_of_a_kind})
end
it "returns information about the winning potential of the hand" do
it "ranks a full house hand correctly" do
expect(full_house_hand.rank).to eq ({:type => :full_house})
end
it "returns information about the winning potential of the hand" do
it "ranks a flush hand correctly" do
expect(flush_hand.rank).to eq ({:type => :flush})
end
it "returns information about the winning potential of the hand" do
it "ranks a straight hand correctly" do
expect(straight_hand.rank).to eq ({:type => :straight})
end
it "works with a straight with low ace" do
it "ranks a straight with low ace hand correctly" do
expect(straight_hand_low_ace.rank).to eq ({:type => :straight})
end
it "works with a straight with high ace" do
it "ranks a straight with high ace hand correctly" do
expect(straight_hand_high_ace.rank).to eq ({:type => :straight})
end
it "works with a two pair hand" do
it "ranks a two pair hand correctly" do
expect(two_pair_hand.rank).to eq ({:type => :two_pair})
end
it "works with a straight flush hand" do
it "ranks a straight flush hand correctly" do
expect(straight_flush_hand.rank).to eq ({:type => :straight_flush})
end
end

0 comments on commit 7663fbe

Please sign in to comment.