-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathblack_jack_spec.rb
90 lines (68 loc) · 1.77 KB
/
black_jack_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require './black_jack'
require './person'
describe "Game" do
# before each test, create a new @game
before(:each) do
@game = Game.new()
end
it "has an attribute called shoe_size of 6" do
pending
end
it 'generates a deck of of shoe_size * 52 when initialized' do
pending
end
it "creates a shuffled deck" do
pending
end
it 'has two players' do
pending
end
it 'deals two cards to each player' do
pending
end
describe "while dealing" do
it "creates a new deck if there are less than 1/4 of the cards remaining" do
pending
end
it "gives the player two cards from the deck" do
pending
end
it "gives the dealer two cards from the deck" do
pending
end
end
describe "while playing" do
it "returns nil if the player and dealer both have blackjack" do
pending
end
it "returns the player object as the winner if the player has blackjack" do
pending
end
it "returns the dealer object as the winner if the dealer has blackjack" do
pending
end
it "should return the dealer if the player busts" do
pending
end
it "should return the player if the dealer busts" do
pending
end
it "should return the player if the dealer's total is < the player's total" do
pending
end
it "returns the player object as the winner if the player has blackjack" do
pending
end
it "should return nil if the player and the dealer have the same total" do
pending
end
end
describe "while playing on Person's hand" do
it "should obey the player's strategy" do
pending
end
it "should only add cards to the player's hand until the player says stand or busts" do
pending
end
end
end