|
4 | 4 | class PigLatinTest < Minitest::Test |
5 | 5 | def test_word_beginning_with_a |
6 | 6 | # skip |
7 | | - assert_equal "appleay", PigLatin.translate("apple") |
| 7 | + actual = PigLatin.translate('apple') |
| 8 | + expected = 'appleay' |
| 9 | + assert_equal expected, actual |
8 | 10 | end |
9 | 11 |
|
10 | 12 | def test_word_beginning_with_e |
11 | 13 | skip |
12 | | - assert_equal "earay", PigLatin.translate("ear") |
| 14 | + actual = PigLatin.translate('ear') |
| 15 | + expected = 'earay' |
| 16 | + assert_equal expected, actual |
13 | 17 | end |
14 | 18 |
|
15 | 19 | def test_word_beginning_with_i |
16 | 20 | skip |
17 | | - assert_equal "iglooay", PigLatin.translate("igloo") |
| 21 | + actual = PigLatin.translate('igloo') |
| 22 | + expected = 'iglooay' |
| 23 | + assert_equal expected, actual |
18 | 24 | end |
19 | 25 |
|
20 | 26 | def test_word_beginning_with_o |
21 | 27 | skip |
22 | | - assert_equal "objectay", PigLatin.translate("object") |
| 28 | + actual = PigLatin.translate('object') |
| 29 | + expected = 'objectay' |
| 30 | + assert_equal expected, actual |
23 | 31 | end |
24 | 32 |
|
25 | 33 | def test_word_beginning_with_u |
26 | 34 | skip |
27 | | - assert_equal "underay", PigLatin.translate("under") |
| 35 | + actual = PigLatin.translate('under') |
| 36 | + expected = 'underay' |
| 37 | + assert_equal expected, actual |
28 | 38 | end |
29 | 39 |
|
30 | 40 | def test_word_beginning_with_a_vowel_and_followed_by_a_qu |
31 | 41 | skip |
32 | | - assert_equal "equalay", PigLatin.translate("equal") |
| 42 | + actual = PigLatin.translate('equal') |
| 43 | + expected = 'equalay' |
| 44 | + assert_equal expected, actual |
33 | 45 | end |
34 | 46 |
|
35 | 47 | def test_word_beginning_with_p |
36 | 48 | skip |
37 | | - assert_equal "igpay", PigLatin.translate("pig") |
| 49 | + actual = PigLatin.translate('pig') |
| 50 | + expected = 'igpay' |
| 51 | + assert_equal expected, actual |
38 | 52 | end |
39 | 53 |
|
40 | 54 | def test_word_beginning_with_k |
41 | 55 | skip |
42 | | - assert_equal "oalakay", PigLatin.translate("koala") |
| 56 | + actual = PigLatin.translate('koala') |
| 57 | + expected = 'oalakay' |
| 58 | + assert_equal expected, actual |
43 | 59 | end |
44 | 60 |
|
45 | 61 | def test_word_beginning_with_x |
46 | 62 | skip |
47 | | - assert_equal "enonxay", PigLatin.translate("xenon") |
| 63 | + actual = PigLatin.translate('xenon') |
| 64 | + expected = 'enonxay' |
| 65 | + assert_equal expected, actual |
48 | 66 | end |
49 | 67 |
|
50 | 68 | def test_word_beginning_with_q_without_a_following_u |
51 | 69 | skip |
52 | | - assert_equal "atqay", PigLatin.translate("qat") |
| 70 | + actual = PigLatin.translate('qat') |
| 71 | + expected = 'atqay' |
| 72 | + assert_equal expected, actual |
| 73 | + end |
| 74 | + |
| 75 | + def test_word_beginning_with_consonant_and_vowel_containing_qu |
| 76 | + skip |
| 77 | + actual = PigLatin.translate('liquid') |
| 78 | + expected = 'iquidlay' |
| 79 | + assert_equal expected, actual |
53 | 80 | end |
54 | 81 |
|
55 | 82 | def test_word_beginning_with_ch |
56 | 83 | skip |
57 | | - assert_equal "airchay", PigLatin.translate("chair") |
| 84 | + actual = PigLatin.translate('chair') |
| 85 | + expected = 'airchay' |
| 86 | + assert_equal expected, actual |
58 | 87 | end |
59 | 88 |
|
60 | 89 | def test_word_beginning_with_qu |
61 | 90 | skip |
62 | | - assert_equal "eenquay", PigLatin.translate("queen") |
| 91 | + actual = PigLatin.translate('queen') |
| 92 | + expected = 'eenquay' |
| 93 | + assert_equal expected, actual |
63 | 94 | end |
64 | 95 |
|
65 | 96 | def test_word_beginning_with_qu_and_a_preceding_consonant |
66 | 97 | skip |
67 | | - assert_equal "aresquay", PigLatin.translate("square") |
| 98 | + actual = PigLatin.translate('square') |
| 99 | + expected = 'aresquay' |
| 100 | + assert_equal expected, actual |
68 | 101 | end |
69 | 102 |
|
70 | 103 | def test_word_beginning_with_th |
71 | 104 | skip |
72 | | - assert_equal "erapythay", PigLatin.translate("therapy") |
| 105 | + actual = PigLatin.translate('therapy') |
| 106 | + expected = 'erapythay' |
| 107 | + assert_equal expected, actual |
73 | 108 | end |
74 | 109 |
|
75 | 110 | def test_word_beginning_with_thr |
76 | 111 | skip |
77 | | - assert_equal "ushthray", PigLatin.translate("thrush") |
| 112 | + actual = PigLatin.translate('thrush') |
| 113 | + expected = 'ushthray' |
| 114 | + assert_equal expected, actual |
78 | 115 | end |
79 | 116 |
|
80 | 117 | def test_word_beginning_with_sch |
81 | 118 | skip |
82 | | - assert_equal "oolschay", PigLatin.translate("school") |
| 119 | + actual = PigLatin.translate('school') |
| 120 | + expected = 'oolschay' |
| 121 | + assert_equal expected, actual |
83 | 122 | end |
84 | 123 |
|
85 | 124 | def test_word_beginning_with_yt |
86 | 125 | skip |
87 | | - assert_equal "yttriaay", PigLatin.translate("yttria") |
| 126 | + actual = PigLatin.translate('yttria') |
| 127 | + expected = 'yttriaay' |
| 128 | + assert_equal expected, actual |
88 | 129 | end |
89 | 130 |
|
90 | 131 | def test_word_beginning_with_xr |
91 | 132 | skip |
92 | | - assert_equal "xrayay", PigLatin.translate("xray") |
| 133 | + actual = PigLatin.translate('xray') |
| 134 | + expected = 'xrayay' |
| 135 | + assert_equal expected, actual |
93 | 136 | end |
94 | 137 |
|
95 | 138 | def test_y_is_treated_like_a_consonant_at_the_beginning_of_a_word |
96 | 139 | skip |
97 | | - assert_equal "ellowyay", PigLatin.translate("yellow") |
| 140 | + actual = PigLatin.translate('yellow') |
| 141 | + expected = 'ellowyay' |
| 142 | + assert_equal expected, actual |
98 | 143 | end |
99 | 144 |
|
100 | 145 | def test_y_is_treated_like_a_vowel_at_the_end_of_a_consonant_cluster |
101 | 146 | skip |
102 | | - assert_equal "ythmrhay", PigLatin.translate("rhythm") |
| 147 | + actual = PigLatin.translate('rhythm') |
| 148 | + expected = 'ythmrhay' |
| 149 | + assert_equal expected, actual |
103 | 150 | end |
104 | 151 |
|
105 | 152 | def test_y_as_second_letter_in_two_letter_word |
106 | 153 | skip |
107 | | - assert_equal "ymay", PigLatin.translate("my") |
| 154 | + actual = PigLatin.translate('my') |
| 155 | + expected = 'ymay' |
| 156 | + assert_equal expected, actual |
108 | 157 | end |
109 | 158 |
|
110 | 159 | def test_a_whole_phrase |
111 | 160 | skip |
112 | | - assert_equal "ickquay astfay unray", PigLatin.translate("quick fast run") |
| 161 | + actual = PigLatin.translate('quick fast run') |
| 162 | + expected = 'ickquay astfay unray' |
| 163 | + assert_equal expected, actual |
113 | 164 | end |
114 | 165 | end |
0 commit comments