From 35654cdbd87f615e848921e50e5ebf17b0f618d2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 19 Sep 2018 17:13:57 -0700 Subject: Less fancy --- lib/action_mailroom/test_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/action_mailroom/test_helper.rb b/lib/action_mailroom/test_helper.rb index 7f56831f36..bd9d57bd38 100644 --- a/lib/action_mailroom/test_helper.rb +++ b/lib/action_mailroom/test_helper.rb @@ -6,8 +6,8 @@ module ActionMailroom create_inbound_email file_fixture(fixture_name).open, filename: fixture_name, status: status end - def create_inbound_email_from_mail(status: :processing, &block) - create_inbound_email(StringIO.new(Mail.new { instance_eval(&block) }.to_s), status: status) + def create_inbound_email_from_mail(status: :processing, **mail_options) + create_inbound_email(StringIO.new(Mail.new(mail_options).to_s), status: status) end def create_inbound_email(io, filename: 'mail.eml', status: status) -- cgit v1.2.3