diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-25 16:27:44 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-25 16:27:44 +0200 |
commit | aee63a12f2cfd110725c74686ae1eed58e18fda7 (patch) | |
tree | 5862b5e54260f37ef11150f72209e7f18bd8cd99 /railties | |
parent | 534f7b54e33a142c8c0aca8b92a6298701efd13b (diff) | |
download | rails-aee63a12f2cfd110725c74686ae1eed58e18fda7.tar.gz rails-aee63a12f2cfd110725c74686ae1eed58e18fda7.tar.bz2 rails-aee63a12f2cfd110725c74686ae1eed58e18fda7.zip |
More tests for mailer.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/mailer_generator_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 2574ed43bd..d702379822 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -8,7 +8,7 @@ class MailerGeneratorTest < GeneratorsTestCase def test_mailer_skeleton_is_created run_generator - assert_file "app/models/notifier.rb" + assert_file "app/models/notifier.rb", /class Notifier < ActionMailer::Base/ end def test_check_class_collision @@ -39,6 +39,12 @@ class MailerGeneratorTest < GeneratorsTestCase assert_match /Could not find and invoke 'unknown:generators:mailer'/, content end + def test_actions_are_turned_into_methods + run_generator + assert_file "app/models/notifier.rb", /def foo/ + assert_file "app/models/notifier.rb", /def bar/ + end + protected def run_generator(args=["notifier", "foo", "bar"]) |