Sha256: 7419ba26e9fd2f6ea545440fdaf63413c26c8620246b43c94c288035cf011de8

Contents?: true

Size: 862 Bytes

Versions: 16

Compression:

Stored size: 862 Bytes

Contents

create_deck = proc {Deck.new true}
deck = create_deck.call
describe Deck do
	describe create_deck.call.cards.length do
		it {is_expected.to eq(54)}
	end
end
describe "converter" do
	context "when a number" do
		it "should return the input as a number" do
			expect(converter("5")).to eq 5
		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 create_deck.call
	describe "#hand" do
		describe "#length" do
			subject { hand.hand.length }
			it "should == 3" do; expect( subject ).to eq 3; end
		end
	end
	describe "#initialize" do
		describe "Deck#length" do
			it "should have three less cards after initialization" do
				deck1, hand, deck2 = deck.cards.length, Hand.new( deck ), deck.cards.length
				expect( deck1 ).to be > deck2
			end
		end
	end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
99_game-3.1.0.pre.103 spec/lib/99_game_spec.rb
99_game-3.0.1.pre.102 spec/lib/99_game_spec.rb
99_game-3.0.1.pre.101 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.100 spec/lib/99_game_spec.rb
99_game-3.0.0 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.98 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.96 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.95 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.94 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.93 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.92 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.91 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.90 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.89 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.85 spec/lib/99_game_spec.rb
99_game-3.0.0.pre.84 spec/lib/99_game_spec.rb