aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/mail_layout_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/mail_layout_test.rb')
-rw-r--r--actionmailer/test/mail_layout_test.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb
index 71e93c29f1..7f959282cb 100644
--- a/actionmailer/test/mail_layout_test.rb
+++ b/actionmailer/test/mail_layout_test.rb
@@ -1,9 +1,9 @@
require 'abstract_unit'
class AutoLayoutMailer < ActionMailer::Base
- default :to => 'test@localhost',
- :subject => "You have a mail",
- :from => "tester@example.com"
+ default to: 'test@localhost',
+ subject: "You have a mail",
+ from: "tester@example.com"
def hello
mail()
@@ -11,16 +11,16 @@ class AutoLayoutMailer < ActionMailer::Base
def spam
@world = "Earth"
- mail(:body => render(:inline => "Hello, <%= @world %>", :layout => 'spam'))
+ mail(body: render(inline: "Hello, <%= @world %>", layout: 'spam'))
end
def nolayout
@world = "Earth"
- mail(:body => render(:inline => "Hello, <%= @world %>", :layout => false))
+ mail(body: render(inline: "Hello, <%= @world %>", layout: false))
end
def multipart(type = nil)
- mail(:content_type => type) do |format|
+ mail(content_type: type) do |format|
format.text { render }
format.html { render }
end
@@ -28,11 +28,11 @@ class AutoLayoutMailer < ActionMailer::Base
end
class ExplicitLayoutMailer < ActionMailer::Base
- layout 'spam', :except => [:logout]
+ layout 'spam', except: [:logout]
- default :to => 'test@localhost',
- :subject => "You have a mail",
- :from => "tester@example.com"
+ default to: 'test@localhost',
+ subject: "You have a mail",
+ from: "tester@example.com"
def signup
mail()