-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbob_test.exs
55 lines (42 loc) · 1.36 KB
/
bob_test.exs
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
Code.load_file("bob.exs")
ExUnit.start
defmodule TeenagerTest do
use ExUnit.Case, async: true
doctest Teenager
test "stating something" do
assert Teenager.hey("Tom-ay-to, tom-aaaah-to.") == "Whatever."
end
test "shouting" do
# assert Teenager.hey("WATCH OUT!") == "Woah, chill out!"
end
test "asking a question" do
# assert Teenager.hey("Does this cryogenic chamber make me look fat?") == "Sure."
end
test "talking forcefully" do
# assert Teenager.hey("Let's go make out behind the gym!") == "Whatever."
end
test "shouting numbers" do
# assert Teenager.hey("1, 2, 3 GO!") == "Woah, chill out!"
end
test "shouting with special characters" do
# assert Teenager.hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!") == "Woah, chill out!"
end
test "shouting with no exclamation mark" do
# assert Teenager.hey("I HATE YOU") == "Woah, chill out!"
end
test "statement containing question mark" do
# assert Teenager.hey("Ending with ? means a question.") == "Whatever."
end
test "silence" do
# assert Teenager.hey("") == "Fine. Be that way!"
end
test "prolonged silence" do
# assert Teenager.hey(" ") == "Fine. Be that way!"
end
test "only numbers" do
# assert Teenager.hey("1, 2, 3") == "Whatever."
end
test "question with numbers" do
# assert Teenager.hey("4?") == "Sure."
end
end