diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/generators/rails/mailer/USAGE | 4 | ||||
-rw-r--r-- | railties/lib/generators/rails/mailer/mailer_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/generators/test_unit/mailer/mailer_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/generators/test_unit/mailer/templates/functional_test.rb (renamed from railties/lib/generators/test_unit/mailer/templates/unit_test.rb) | 0 | ||||
-rw-r--r-- | railties/test/generators/mailer_generator_test.rb | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/railties/lib/generators/rails/mailer/USAGE b/railties/lib/generators/rails/mailer/USAGE index c56095b2c8..4b0b8ddc3b 100644 --- a/railties/lib/generators/rails/mailer/USAGE +++ b/railties/lib/generators/rails/mailer/USAGE @@ -9,7 +9,7 @@ Example: `./script/generate mailer Notifications signup forgot_password invoice` creates a Notifications mailer class, views, test, and fixtures: - Mailer: app/models/notifications.rb + Mailer: app/mailers/notifications.rb Views: app/views/notifications/signup.erb [...] - Test: test/unit/test/unit/notifications_test.rb + Test: test/functional/notifications_test.rb Fixtures: test/fixtures/notifications/signup [...] diff --git a/railties/lib/generators/rails/mailer/mailer_generator.rb b/railties/lib/generators/rails/mailer/mailer_generator.rb index 33f1665b83..8993181d79 100644 --- a/railties/lib/generators/rails/mailer/mailer_generator.rb +++ b/railties/lib/generators/rails/mailer/mailer_generator.rb @@ -5,7 +5,7 @@ module Rails check_class_collision def create_mailer_file - template "mailer.rb", File.join('app/models', class_path, "#{file_name}.rb") + template "mailer.rb", File.join('app/mailers', class_path, "#{file_name}.rb") end hook_for :template_engine, :test_framework diff --git a/railties/lib/generators/test_unit/mailer/mailer_generator.rb b/railties/lib/generators/test_unit/mailer/mailer_generator.rb index ef350a6224..a0d73db1b0 100644 --- a/railties/lib/generators/test_unit/mailer/mailer_generator.rb +++ b/railties/lib/generators/test_unit/mailer/mailer_generator.rb @@ -7,7 +7,7 @@ module TestUnit check_class_collision :suffix => "Test" def create_test_files - template "unit_test.rb", File.join('test/unit', class_path, "#{file_name}_test.rb") + template "functional_test.rb", File.join('test/functional', class_path, "#{file_name}_test.rb") end def create_fixtures_files diff --git a/railties/lib/generators/test_unit/mailer/templates/unit_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index 4de94076e9..4de94076e9 100644 --- a/railties/lib/generators/test_unit/mailer/templates/unit_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index deabfb432c..dfc3130f77 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -7,7 +7,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_mailer_skeleton_is_created run_generator - assert_file "app/models/notifier.rb", /class Notifier < ActionMailer::Base/ + assert_file "app/mailers/notifier.rb", /class Notifier < ActionMailer::Base/ end def test_check_class_collision @@ -17,7 +17,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_invokes_default_test_framework run_generator - assert_file "test/unit/notifier_test.rb", /class NotifierTest < ActionMailer::TestCase/ + assert_file "test/functional/notifier_test.rb", /class NotifierTest < ActionMailer::TestCase/ assert_file "test/fixtures/notifier/foo", /app\/views\/notifier\/foo/ assert_file "test/fixtures/notifier/bar", /app\/views\/notifier\/bar/ end @@ -40,7 +40,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase 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/ + assert_file "app/mailers/notifier.rb", /def foo/ + assert_file "app/mailers/notifier.rb", /def bar/ end end |