Skip to content

Commit e50e502

Browse files
committed
fix warnings
1 parent 7f37be6 commit e50e502

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

test/email_reply_parser_test.rb

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ def test_reads_top_post
5050
assert_equal [false, true, false, false, true],
5151
reply.fragments.map { |f| f.signature? }
5252

53-
assert_match /^Oh thanks.\n\nHaving/, reply.fragments[0].to_s
54-
assert_match /^-A/, reply.fragments[1].to_s
55-
assert_match /^On [^\:]+\:/, reply.fragments[2].to_s
56-
assert_match /^_/, reply.fragments[4].to_s
53+
assert_match(/^Oh thanks.\n\nHaving/, reply.fragments[0].to_s)
54+
assert_match(/^-A/, reply.fragments[1].to_s)
55+
assert_match(/^On [^\:]+\:/, reply.fragments[2].to_s)
56+
assert_match(/^_/, reply.fragments[4].to_s)
5757
end
5858

5959
def test_reads_bottom_post
@@ -68,10 +68,10 @@ def test_reads_bottom_post
6868
reply.fragments.map { |f| f.hidden? }
6969

7070
assert_equal "Hi,", reply.fragments[0].to_s
71-
assert_match /^On [^\:]+\:/, reply.fragments[1].to_s
72-
assert_match /^You can list/, reply.fragments[2].to_s
73-
assert_match /^> /, reply.fragments[3].to_s
74-
assert_match /^_/, reply.fragments[5].to_s
71+
assert_match(/^On [^\:]+\:/, reply.fragments[1].to_s)
72+
assert_match(/^You can list/, reply.fragments[2].to_s)
73+
assert_match(/^> /, reply.fragments[3].to_s)
74+
assert_match(/^_/, reply.fragments[5].to_s)
7575
end
7676

7777
def test_reads_inline_replies
@@ -85,21 +85,21 @@ def test_reads_inline_replies
8585
assert_equal [false, false, false, false, true, true, true],
8686
reply.fragments.map { |f| f.hidden? }
8787

88-
assert_match /^On [^\:]+\:/, reply.fragments[0].to_s
89-
assert_match /^I will reply/, reply.fragments[1].to_s
88+
assert_match(/^On [^\:]+\:/, reply.fragments[0].to_s)
89+
assert_match(/^I will reply/, reply.fragments[1].to_s)
9090
assert_match "okay?", reply.fragments[2].to_s
91-
assert_match /^and under this./, reply.fragments[3].to_s
92-
assert_match /inline/, reply.fragments[4].to_s
91+
assert_match(/^and under this./, reply.fragments[3].to_s)
92+
assert_match(/inline/, reply.fragments[4].to_s)
9393
assert_equal "\n", reply.fragments[5].to_s
9494
assert_equal "--\nHey there, this is my signature\n", reply.fragments[6].to_s
9595
end
9696

9797
def test_recognizes_date_string_above_quote
9898
reply = email :email_1_4
9999

100-
assert_match /^Awesome/, reply.fragments[0].to_s
101-
assert_match /^On/, reply.fragments[1].to_s
102-
assert_match /Loader/, reply.fragments[1].to_s
100+
assert_match(/^Awesome/, reply.fragments[0].to_s)
101+
assert_match(/^On/, reply.fragments[1].to_s)
102+
assert_match(/Loader/, reply.fragments[1].to_s)
103103
end
104104

105105
def test_a_complex_body_with_only_one_fragment
@@ -115,23 +115,23 @@ def test_reads_email_with_correct_signature
115115
assert_equal [false, false], reply.fragments.map { |f| f.quoted? }
116116
assert_equal [false, true], reply.fragments.map { |f| f.signature? }
117117
assert_equal [false, true], reply.fragments.map { |f| f.hidden? }
118-
assert_match /^-- \nrick/, reply.fragments[1].to_s
118+
assert_match(/^-- \nrick/, reply.fragments[1].to_s)
119119
end
120120

121121
def test_deals_with_multiline_reply_headers
122122
reply = email :email_1_6
123123

124-
assert_match /^I get/, reply.fragments[0].to_s
125-
assert_match /^On/, reply.fragments[1].to_s
126-
assert_match /Was this/, reply.fragments[1].to_s
124+
assert_match(/^I get/, reply.fragments[0].to_s)
125+
assert_match(/^On/, reply.fragments[1].to_s)
126+
assert_match(/Was this/, reply.fragments[1].to_s)
127127
end
128128

129129
def test_deals_with_windows_line_endings
130130
reply = email :email_1_7
131131

132-
assert_match /:\+1:/, reply.fragments[0].to_s
133-
assert_match /^On/, reply.fragments[1].to_s
134-
assert_match /Steps 0-2/, reply.fragments[1].to_s
132+
assert_match(/:\+1:/, reply.fragments[0].to_s)
133+
assert_match(/^On/, reply.fragments[1].to_s)
134+
assert_match(/Steps 0-2/, reply.fragments[1].to_s)
135135
end
136136

137137
def test_handles_non_ascii_characters
@@ -193,22 +193,22 @@ def test_parse_reply
193193

194194
def test_one_is_not_on
195195
reply = email("email_one_is_not_on")
196-
assert_match /One outstanding question/, reply.fragments[0].to_s
197-
assert_match /^On Oct 1, 2012/, reply.fragments[1].to_s
196+
assert_match(/One outstanding question/, reply.fragments[0].to_s)
197+
assert_match(/^On Oct 1, 2012/, reply.fragments[1].to_s)
198198
end
199199

200200
def test_mulitple_on
201201
reply = email("greedy_on")
202-
assert_match /^On your remote host/, reply.fragments[0].to_s
203-
assert_match /^On 9 Jan 2014/, reply.fragments[1].to_s
202+
assert_match(/^On your remote host/, reply.fragments[0].to_s)
203+
assert_match(/^On 9 Jan 2014/, reply.fragments[1].to_s)
204204
assert_equal [false, true, false], reply.fragments.map { |f| f.quoted? }
205205
assert_equal [false, false, false], reply.fragments.map { |f| f.signature? }
206206
assert_equal [false, true, true], reply.fragments.map { |f| f.hidden? }
207207
end
208208

209209
def test_pathological_emails
210210
t0 = Time.now
211-
reply = email("pathological")
211+
email("pathological")
212212
assert (Time.now - t0) < 1, "Took too long, upgrade to re2 gem."
213213
end
214214

0 commit comments

Comments
 (0)