diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-26 01:56:52 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-26 01:56:52 +0100 |
commit | abad097016bf5243e9812f6a031f421a986b09f7 (patch) | |
tree | f526a520a87db9c68ddd3436ce4bdb6f8c3182d1 /railties/lib/generators/test_unit | |
parent | 8974dac92e05dcab8ee552a5f40108c6ac25dc36 (diff) | |
parent | c02391f8f97182e818d22a0f0ec4a5589d2fff15 (diff) | |
download | rails-abad097016bf5243e9812f6a031f421a986b09f7.tar.gz rails-abad097016bf5243e9812f6a031f421a986b09f7.tar.bz2 rails-abad097016bf5243e9812f6a031f421a986b09f7.zip |
Merge remote branch 'mikel/master'
Diffstat (limited to 'railties/lib/generators/test_unit')
-rw-r--r-- | railties/lib/generators/test_unit/mailer/templates/fixture | 2 | ||||
-rw-r--r-- | railties/lib/generators/test_unit/mailer/templates/functional_test.rb | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/generators/test_unit/mailer/templates/fixture b/railties/lib/generators/test_unit/mailer/templates/fixture index fcce7bd805..171648d6fd 100644 --- a/railties/lib/generators/test_unit/mailer/templates/fixture +++ b/railties/lib/generators/test_unit/mailer/templates/fixture @@ -1,3 +1,3 @@ <%= class_name %>#<%= @action %> -Find me in app/views/<%= @path %> +Hi, find me in app/views/<%= @path %> diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index 4de94076e9..fcebb40135 100644 --- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb @@ -3,11 +3,13 @@ require 'test_helper' class <%= class_name %>Test < ActionMailer::TestCase <% for action in actions -%> test "<%= action %>" do - @expected.subject = '<%= class_name %>#<%= action %>' - @expected.body = read_fixture('<%= action %>') + @expected.subject = <%= action.to_s.humanize.inspect %> + @expected.to = "to@example.com" + @expected.from = "from@example.com" + @expected.body = read_fixture("<%= action %>") @expected.date = Time.now - assert_equal @expected.encoded, <%= class_name %>.create_<%= action %>(@expected.date).encoded + assert_equal @expected, <%= class_name %>.<%= action %> end <% end -%> |