Skip to content

Commit 9c46620

Browse files
authored
Merge pull request #1318 from sebbASF/part_spec_master
Don't shadow local variable
2 parents f81a410 + 942cb29 commit 9c46620

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/mail/part_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@
206206
end
207207

208208
it "retains specified encoding even though it isn't lowest cost" do
209-
part = Mail::Part.new.tap do |part|
209+
mail = Mail::Part.new.tap do |part|
210210
part.header[:content_disposition] = 'attachment; filename="unnamed"'
211211
part.content_type = 'text/plain'
212212
# part.body = 'a' * 998
213213
part.body = 'a' * 999
214214
part.body.encoding = 'base64'
215215
end
216216

217-
part_body_encoding = part.to_s.scan(/Content-Transfer-Encoding: (.+)\r$/).last.first
217+
part_body_encoding = mail.to_s.scan(/Content-Transfer-Encoding: (.+)\r$/).last.first
218218
expect(part_body_encoding).to eq('base64')
219219
end
220220
end

0 commit comments

Comments
 (0)