-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathisogram_test.rb
88 lines (74 loc) · 2.49 KB
/
isogram_test.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
require 'minitest/autorun'
require_relative 'isogram'
class IsogramTest < Minitest::Test
def test_empty_string
# skip
input = ""
assert Isogram.isogram?(input), "Expected true, '#{input}' is an isogram"
end
def test_isogram_with_only_lower_case_characters
#skip
input = "isogram"
assert Isogram.isogram?(input), "Expected true, '#{input}' is an isogram"
end
def test_word_with_one_duplicated_character
#skip
input = "eleven"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_word_with_one_duplicated_character_from_the_end_of_the_alphabet
#skip
input = "zzyzx"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_longest_reported_english_isogram
#skip
input = "subdermatoglyphic"
assert Isogram.isogram?(input), "Expected true, '#{input}' is an isogram"
end
def test_word_with_duplicated_character_in_mixed_case
#skip
input = "Alphabet"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_word_with_duplicated_character_in_mixed_case_lowercase_first
#skip
input = "alphAbet"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_hypothetical_isogrammic_word_with_hyphen
#skip
input = "thumbscrew-japingly"
assert Isogram.isogram?(input), "Expected true, '#{input}' is an isogram"
end
def test_hypothetical_word_with_duplicated_character_following_hyphen
#skip
input = "thumbscrew-jappingly"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_isogram_with_duplicated_hyphen
#skip
input = "six-year-old"
assert Isogram.isogram?(input), "Expected true, '#{input}' is an isogram"
end
def test_made_up_name_that_is_an_isogram
#skip
input = "Emily Jung Schwartzkopf"
assert Isogram.isogram?(input), "Expected true, '#{input}' is an isogram"
end
def test_duplicated_character_in_the_middle
# skip
input = "accentor"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_same_first_and_last_characters
#skip
input = "angola"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
def test_word_with_duplicated_character_and_with_two_hyphens
#skip
input = "up-to-date"
refute Isogram.isogram?(input), "Expected false, '#{input}' is not an isogram"
end
end