提交 ba74754c 编写于 作者: J Jeremy Kemper

Mailer generator: handle mailers in modules, set mime_version in unit test.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 1d7196b5
*SVN* *SVN*
* Mailer generator: handle mailers in modules, set mime_version in unit test. [Jeremy Kemper]
* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Koz] * Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Koz]
* Added config.plugins to control which plugins are loaded #6269 [skaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example: * Added config.plugins to control which plugins are loaded #6269 [skaes]. By default, everything in vendor/plugins will be loaded, but if you specify config.plugins, only those will be loaded. Example:
......
...@@ -29,8 +29,7 @@ def manifest ...@@ -29,8 +29,7 @@ def manifest
# View template for each action. # View template for each action.
actions.each do |action| actions.each do |action|
path = File.join('app/views', class_path, file_name, "#{action}.rhtml") path = File.join('app/views', class_path, file_name, "#{action}.rhtml")
m.template 'view.rhtml', m.template 'view.rhtml', path,
path,
:assigns => { :action => action, :path => path } :assigns => { :action => action, :path => path }
end end
end end
......
...@@ -20,12 +20,14 @@ def manifest ...@@ -20,12 +20,14 @@ def manifest
# View template and fixture for each action. # View template and fixture for each action.
actions.each do |action| actions.each do |action|
m.template "view.rhtml", relative_path = File.join(class_path, file_name, "#{action}.rhtml")
File.join('app/views', class_path, file_name, "#{action}.rhtml"), view_path = File.join('app/views', relative_path)
:assigns => { :action => action } fixture_path = File.join('test/fixtures', relative_path)
m.template "fixture.rhtml",
File.join('test/fixtures', class_path, file_name, action), m.template "view.rhtml", view_path,
:assigns => { :action => action } :assigns => { :action => action, :path => view_path }
m.template "fixture.rhtml", fixture_path,
:assigns => { :action => action, :path => fixture_path }
end end
end end
end end
......
<%= class_name %>#<%= action %> <%= class_name %>#<%= action %>
Find me in app/views/<%= file_name %>/<%= action %>.rhtml Find me in <%= path %>
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
require '<%= file_name %>' require '<%= file_name %>'
class <%= class_name %>Test < Test::Unit::TestCase class <%= class_name %>Test < Test::Unit::TestCase
...@@ -14,6 +14,7 @@ def setup ...@@ -14,6 +14,7 @@ def setup
@expected = TMail::Mail.new @expected = TMail::Mail.new
@expected.set_content_type "text", "plain", { "charset" => CHARSET } @expected.set_content_type "text", "plain", { "charset" => CHARSET }
@expected.mime_version = '1.0'
end end
<% for action in actions -%> <% for action in actions -%>
......
<%= class_name %>#<%= action %> <%= class_name %>#<%= action %>
Find me in app/views/<%= file_name %>/<%= action %>.rhtml Find me in <%= path %>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册