0
@@ -18,33 +18,26 @@ class EmbeddedActionTest < Test::Unit::TestCase
0
- assert_embed_erb "Params: action: dump_params, controller: test, id: \n",
0
- "<%= embed_action :action => 'dump_params' %>",
0
- "embed_action should accept implicit controller"
0
+ get :inline_erb_action, :erb => "<%= embed_action :action => 'dump_params' %>"
0
+ assert_equal "Params: action: dump_params, controller: test, id: ", @response.body, "embed_action should accept implicit controller"
0
- assert_embed_erb "Params: action: dump_params, controller: test, id: \n",
0
- "<%= embed_action :controller => 'test', :action => 'dump_params' %>",
0
- "embed_action should accept explicit controller"
0
+ get :inline_erb_action, :erb => "<%= embed_action :controller => 'test', :action => 'dump_params' %>"
0
+ assert_equal "Params: action: dump_params, controller: test, id: ", @response.body, "embed_action should accept explicit controller"
0
- assert_embed_erb "Params: action: dump_params, controller: test, id: the id\n",
0
- "<%= embed_action :action => 'dump_params', :id => 'the id' %>",
0
- "embed_action should pass the id"
0
+ get :inline_erb_action, :erb => "<%= embed_action :action => 'dump_params', :id => 'the id' %>"
0
+ assert_equal "Params: action: dump_params, controller: test, id: the id", @response.body, "embed_action should pass the id"
0
- assert_embed_erb "Params: action: dump_params, color: blue, controller: test, id: the id\n",
0
- "<%= embed_action :action => 'dump_params', :id => 'the id', :params => {:color => 'blue'} %>",
0
- "embed_action should pass params as expected"
0
+ get :inline_erb_action, :erb => "<%= embed_action :action => 'dump_params', :id => 'the id', :params => {:color => 'blue'} %>"
0
+ assert_equal "Params: action: dump_params, color: blue, controller: test, id: the id", @response.body, "embed_action should pass params as expected"
0
- assert_embed_erb "Params: action: dump_params, color: blue, controller: test, id: the id\n",
0
- "<%= embed_action :action => 'dump_params', :id => 'the id', :color => 'blue' %>",
0
- "embed_action should merge into params anything that's not standard"
0
+ get :inline_erb_action, :erb => "<%= embed_action :action => 'dump_params', :id => 'the id', :color => 'blue' %>"
0
+ assert_equal "Params: action: dump_params, color: blue, controller: test, id: the id", @response.body, "embed_action should merge into params anything that's not standard"
0
- assert_embed_erb "Params: action: dump_params, color: red, controller: test, id: the id\n",
0
- "<%= embed_action :action => 'dump_params', :id => 'the id', :color => 'blue', :params => {:color => 'red'} %>",
0
- "embed_action should override with the contents of params"
0
+ get :inline_erb_action, :erb => "<%= embed_action :action => 'dump_params', :id => 'the id', :color => 'blue', :params => {:color => 'red'} %>"
0
+ assert_equal "Params: action: dump_params, color: red, controller: test, id: the id", @response.body, "embed_action should override with the contents of params"
0
- assert_embed_erb "Params: action: dump_params, color: red, controller: test, id: the id\n",
0
- "<%= embed_action :action => 'dump_params', :id => 'the id', :color => 'blue', :params => {'color' => 'red'} %>",
0
- "embed_action should allow indifferent access"
0
+ get :inline_erb_action, :erb => "<%= embed_action :action => 'dump_params', :id => 'the id', :color => 'blue', :params => {'color' => 'red'} %>"
0
+ assert_equal "Params: action: dump_params, color: red, controller: test, id: the id", @response.body, "embed_action should allow indifferent access"
Comments
No one has commented yet.