test/generators/test_mailer_generator.rb in minitest-rails-2.2.1 vs test/generators/test_mailer_generator.rb in minitest-rails-3.0.0.rc1
- old
+ new
@@ -2,42 +2,41 @@
require "generators/minitest/mailer/mailer_generator"
class TestMailerGenerator < GeneratorTest
def test_mailer_generator
- assert_output(/create test\/mailers\/notification_test.rb/m) do
+ assert_output(/create test\/mailers\/notification_mailer_test.rb/m) do
Minitest::Generators::MailerGenerator.start ["notification"]
end
- assert File.exists? "test/mailers/notification_test.rb"
- contents = File.read "test/mailers/notification_test.rb"
- assert_match(/class NotificationTest/m, contents)
+ assert File.exists? "test/mailers/notification_mailer_test.rb"
+ contents = File.read "test/mailers/notification_mailer_test.rb"
+ assert_match(/class NotificationMailerTest/m, contents)
end
def test_namespaced_mailer_generator
- assert_output(/create test\/mailers\/admin\/notification_test.rb/m) do
+ assert_output(/create test\/mailers\/admin\/notification_mailer_test.rb/m) do
Minitest::Generators::MailerGenerator.start ["admin/notification"]
end
- assert File.exists? "test/mailers/admin/notification_test.rb"
- contents = File.read "test/mailers/admin/notification_test.rb"
- assert_match(/class Admin::NotificationTest/m, contents)
+ assert File.exists? "test/mailers/admin/notification_mailer_test.rb"
+ contents = File.read "test/mailers/admin/notification_mailer_test.rb"
+ assert_match(/class Admin::NotificationMailerTest/m, contents)
end
def test_mailer_generator_spec
- assert_output(/create test\/mailers\/notification_test.rb/m) do
+ assert_output(/create test\/mailers\/notification_mailer_test.rb/m) do
Minitest::Generators::MailerGenerator.start ["notification", "welcome", "--spec"]
end
- assert File.exists? "test/mailers/notification_test.rb"
- contents = File.read "test/mailers/notification_test.rb"
- assert_match(/describe Notification do/m, contents)
+ assert File.exists? "test/mailers/notification_mailer_test.rb"
+ contents = File.read "test/mailers/notification_mailer_test.rb"
+ assert_match(/describe NotificationMailer do/m, contents)
end
def test_namespaced_mailer_generator_spec
- assert_output(/create test\/mailers\/admin\/notification_test.rb/m) do
+ assert_output(/create test\/mailers\/admin\/notification_mailer_test.rb/m) do
Minitest::Generators::MailerGenerator.start ["admin/notification", "welcome", "--spec"]
end
- assert File.exists? "test/mailers/admin/notification_test.rb"
- contents = File.read "test/mailers/admin/notification_test.rb"
- assert_match(/describe Admin::Notification do/m, contents)
+ assert File.exists? "test/mailers/admin/notification_mailer_test.rb"
+ contents = File.read "test/mailers/admin/notification_mailer_test.rb"
+ assert_match(/describe Admin::NotificationMailer do/m, contents)
end
-
end