You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it"prints out the first verse for 99 bottles of beer on the wall, when told to 'sing' with 99"do
3
+
describe"beer_on_the_wall"do
4
+
5
+
it"prints out the first verse for 99 bottles of beer on the wall, when told to 'sing'"do
5
6
pending
6
-
run_script("wall_beer.rb")
7
-
type("sing 99")
7
+
run_script("beer_on_the_wall.rb")
8
+
type("99")
8
9
9
10
expect(all_output).tomatch("99 bottles of beer on the wall, 99 bottles of beer.\nTake one down and pass it around, 98 bottles of beer on the wall.\n")
10
11
expect(all_output).to_notinclude("Fine, don't listen to my song.")
11
12
end
12
13
13
-
it"throws an error if it does not know how many number of bottles"do
14
-
pending
15
-
run_script("wall_beer.rb")
16
-
type("sing")
17
-
18
-
expect(all_output).tomatch("I need to know how many bottles to sing!")
19
-
expect(all_output).to_notinclude("1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no bottles of beer on the wall.\n")
20
-
end
21
-
22
-
it"responds with 'Fine, don't listen to my song.', when told anything else besides 'sing''"do
23
-
pending
24
-
run_script("wall_beer.rb")
25
-
type("I don't want to hear you sing")
26
-
27
-
expect(all_output).tomatch("Fine, don't listen to my song.")
28
-
expect(all_output).to_notinclude("18 bottles of beer on the wall, 18 bottles of beer.\nTake one down and pass it around, 17 bottles of beer on the wall.\n")
29
-
end
30
-
31
-
it"prints out the lyrics for the rest of the verses, except 2-0, when told to sing"do
14
+
it"prints out the lyrics for the rest of the verses"do
32
15
pending
33
-
run_script("wall_beer.rb")
34
-
type("sing 8")
16
+
run_script("beer_on_the_wall.rb")
17
+
type("8")
35
18
36
-
expect(all_output).tomatch("8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n. 7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n")
19
+
expect(all_output).tomatch("8 bottles of beer on the wall, 8 bottles of beer.\nTake one down and pass it around, 7 bottles of beer on the wall.\n7 bottles of beer on the wall, 7 bottles of beer.\nTake one down and pass it around, 6 bottles of beer on the wall.\n")
37
20
expect(all_output).to_notinclude("Fine, don't listen to my song.")
38
21
end
39
22
40
-
it"prints out the lyrics for 2 bottles of beer, when told to sing"do
23
+
it"correctly prints out the lyrics for 2 bottles of beer, when told to sing"do
41
24
pending
42
-
run_script("wall_beer.rb")
43
-
type("sing 2")
25
+
run_script("beer_on_the_wall.rb")
26
+
type("2")
44
27
45
28
expect(all_output).tomatch("2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n")
46
29
expect(all_output).to_notinclude("Fine, don't listen to my song.")
47
30
end
48
31
49
-
it"prints out the lyrics for 1 bottles of beer, when told to sing"do
32
+
it"correctly prints out the lyrics for 1 bottle of beer, when told to sing"do
50
33
pending
51
-
run_script("wall_beer.rb")
52
-
type("sing 1")
34
+
run_script("beer_on_the_wall.rb")
35
+
type("1")
53
36
54
37
expect(all_output).tomatch("1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no bottles of beer on the wall.\n")
55
38
expect(all_output).to_notinclude("Fine, don't listen to my song.")
56
39
end
57
40
58
-
it"prints out the lyrics for no bottles of beer, when told to sing and there is no more beer left"do
41
+
it"correctly prints out the lyrics for no bottles of beer, when told to sing and there is no more beer left"do
59
42
pending
60
-
run_script("wall_beer.rb")
61
-
type("sing 0")
43
+
run_script("beer_on_the_wall.rb")
44
+
type("0")
62
45
63
46
expect(all_output).tomatch("No bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n")
64
47
expect(all_output).to_notinclude("Fine, don't listen to my song.")
65
48
end
49
+
50
+
it"throws an error if it does not know how many number of bottles"do
51
+
pending
52
+
run_script("beer_on_the_wall.rb")
53
+
type("")
54
+
55
+
expect(all_output).tomatch("I need to know how many bottles to sing!")
56
+
expect(all_output).to_notinclude("1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no bottles of beer on the wall.\n")
0 commit comments