diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-11-25 09:14:59 +0800 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-11-25 09:14:59 +0800 |
commit | b8d8ce7ba8e5e83e9b41e48fb6ef449bd36a97e3 (patch) | |
tree | dcc6dc7bcebc3ad552f055d153cd2cd822815ffe /railties/test | |
parent | 35362fc2263d4d7784de172cb5f97eb2541fb65a (diff) | |
download | rails-b8d8ce7ba8e5e83e9b41e48fb6ef449bd36a97e3.tar.gz rails-b8d8ce7ba8e5e83e9b41e48fb6ef449bd36a97e3.tar.bz2 rails-b8d8ce7ba8e5e83e9b41e48fb6ef449bd36a97e3.zip |
Add tests which were incorrectly removed.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/mailer_generator_test.rb | 4 | ||||
-rw-r--r-- | railties/test/generators/namespaced_generators_test.rb | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 915dde1109..20fffd25de 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -79,10 +79,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_invokes_default_text_template_engine run_generator assert_file "app/views/notifier/foo.text.erb" do |view| + assert_match(%r(\sapp/views/notifier/foo\.text\.erb), view) assert_match(/<%= @greeting %>/, view) end assert_file "app/views/notifier/bar.text.erb" do |view| + assert_match(%r(\sapp/views/notifier/bar\.text\.erb), view) assert_match(/<%= @greeting %>/, view) end @@ -94,10 +96,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_invokes_default_html_template_engine run_generator assert_file "app/views/notifier/foo.html.erb" do |view| + assert_match(%r(\sapp/views/notifier/foo\.html\.erb), view) assert_match(/<%= @greeting %>/, view) end assert_file "app/views/notifier/bar.html.erb" do |view| + assert_match(%r(\sapp/views/notifier/bar\.html\.erb), view) assert_match(/<%= @greeting %>/, view) end diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 20e8d2d5d3..6075805152 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -174,10 +174,12 @@ class NamespacedMailerGeneratorTest < NamespacedGeneratorTestCase def test_invokes_default_template_engine run_generator assert_file "app/views/test_app/notifier/foo.text.erb" do |view| + assert_match(%r(app/views/test_app/notifier/foo\.text\.erb), view) assert_match(/<%= @greeting %>/, view) end assert_file "app/views/test_app/notifier/bar.text.erb" do |view| + assert_match(%r(app/views/test_app/notifier/bar\.text\.erb), view) assert_match(/<%= @greeting %>/, view) end end |