Sha256: 613f9f10e0d5f0ee035309ac2f026c14ba8b14dbd76970cc19e31ee777e4ddf5
Contents?: true
Size: 1.66 KB
Versions: 19
Compression:
Stored size: 1.66 KB
Contents
require "helper" class TestTrick < Test::Unit::TestCase test "the highest H card is the winner in NT game H trick and single suit" do trick = Bridge::Trick.new("H2", "H3", "H4", "H5") assert_equal Bridge::Card.new("H5"), trick.winner end test "the highest H card is the winner in NT game H trick and multiple suits" do trick = Bridge::Trick.new("H2", "C3", "D4", "S5") assert_equal Bridge::Card.new("H2"), trick.winner end test "the highest H card is the winner in S game H trick and single suit" do trick = Bridge::Trick.new("H2", "H5", "H4", "H3") assert_equal Bridge::Card.new("H5"), trick.winner("S") end test "the highest H card is the winner in S game H trick and multiple suits" do trick = Bridge::Trick.new("H2", "D5", "C4", "H3") assert_equal Bridge::Card.new("H3"), trick.winner("S") end test "the only trump is the winner in S game H trick and multiple suits" do trick = Bridge::Trick.new("H2", "D5", "S2", "H3") assert_equal Bridge::Card.new("S2"), trick.winner("S") end test "the highest trump is the winner in S game H trick and multiple suits" do trick = Bridge::Trick.new("H2", "SA", "S2", "H3") assert_equal Bridge::Card.new("SA"), trick.winner("S") end test "the highest trump is the winner in S game S trick and multiple suits" do trick = Bridge::Trick.new("S2", "HA", "CA", "DA") assert_equal Bridge::Card.new("S2"), trick.winner("S") end test "is incomplete with 3 cards" do trick = Bridge::Trick.new("S2", "HA", "CA") assert trick.incomplete? end test "is incomplete with 4 cards" do trick = Bridge::Trick.new("S2", "HA", "CA", "DA") assert trick.complete? end end
Version data entries
19 entries across 19 versions & 1 rubygems