From b8c82edc1f5b95bceea3d40de778ec0cd5a37d15 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 26 Jan 2010 18:59:52 +1100 Subject: Updating generators for mailer to reflect changes in API --- railties/test/generators/mailer_generator_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 99ce53323e..e585298a93 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /delivers_from "from@example.com"/, mailer + assert_match /self\.defaults\ =\ \{\ :from\ =>\ "from@example\.com"\ \}/, mailer end end @@ -61,12 +61,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase assert_file "app/mailers/notifier.rb" do |mailer| assert_instance_method :foo, mailer do |foo| - assert_match /mail\(:to => "to@example.com"\)/, foo + assert_match /mail\(:to => "to@example.org"\)/, foo assert_match /@greeting = "Hi"/, foo end assert_instance_method :bar, mailer do |bar| - assert_match /mail\(:to => "to@example.com"\)/, bar + assert_match /mail\(:to => "to@example.org"\)/, bar assert_match /@greeting = "Hi"/, bar end end -- cgit v1.2.3 From 8fabcb2eca03150b1c0c3dbc88dd13123f76894f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 11:48:25 +0100 Subject: Update generators to use new defaults. --- railties/test/generators/mailer_generator_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/test') diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index e585298a93..0b7f5c6817 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /self\.defaults\ =\ \{\ :from\ =>\ "from@example\.com"\ \}/, mailer + assert_match /self\.defaults :from => "from@example.com"/, mailer end end -- cgit v1.2.3