Failing AM test for nested layouts

This commit is contained in:
Joshua Peek 2010-01-26 09:27:21 -06:00
parent 52bb455c0d
commit 9f7190187c
3 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1 @@
Nested Spammer layout <%= yield %>

View File

@ -0,0 +1 @@
We do not spam

View File

@ -51,6 +51,16 @@ class ExplicitLayoutMailer < ActionMailer::Base
end
end
class NestedLayoutMailer < ActionMailer::Base
layout 'nested/layouts/spam'
def signup
recipients 'test@localhost'
subject "You have a mail"
from "tester@example.com"
end
end
class LayoutMailerTest < Test::Unit::TestCase
def setup
set_delivery_method :test
@ -145,4 +155,9 @@ class LayoutMailerTest < Test::Unit::TestCase
mail = ExplicitLayoutMailer.logout
assert_equal "You logged out", mail.body.to_s.strip
end
def test_nested_class_layout
mail = NestedLayoutMailer.signup
assert_equal "Nested Spammer layout We do not spam", mail.body.to_s.strip
end
end