Skip to content

Commit

Permalink
Merge pull request #1318 from sebbASF/part_spec_master
Browse files Browse the repository at this point in the history
Don't shadow local variable
  • Loading branch information
sebbASF authored Jan 18, 2023
2 parents f81a410 + 942cb29 commit 9c46620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/mail/part_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@
end

it "retains specified encoding even though it isn't lowest cost" do
part = Mail::Part.new.tap do |part|
mail = Mail::Part.new.tap do |part|
part.header[:content_disposition] = 'attachment; filename="unnamed"'
part.content_type = 'text/plain'
# part.body = 'a' * 998
part.body = 'a' * 999
part.body.encoding = 'base64'
end

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

0 comments on commit 9c46620

Please sign in to comment.