2009-09-19 17:10:41 +00:00
|
|
|
require 'abstract_unit'
|
2009-03-19 20:35:39 +00:00
|
|
|
|
2009-04-28 01:21:26 +00:00
|
|
|
module RenderImplicitAction
|
|
|
|
class SimpleController < ::ApplicationController
|
2009-06-17 22:32:55 +00:00
|
|
|
self.view_paths = [ActionView::FixtureResolver.new(
|
2009-04-28 01:21:26 +00:00
|
|
|
"render_implicit_action/simple/hello_world.html.erb" => "Hello world!",
|
2009-04-30 00:32:39 +00:00
|
|
|
"render_implicit_action/simple/hyphen-ated.html.erb" => "Hello hyphen-ated!"
|
2009-04-28 01:21:26 +00:00
|
|
|
)]
|
|
|
|
|
|
|
|
def hello_world() end
|
2009-03-19 20:35:39 +00:00
|
|
|
end
|
|
|
|
|
2009-10-04 04:18:32 +00:00
|
|
|
class RenderImplicitActionTest < Rack::TestCase
|
2009-05-20 19:15:06 +00:00
|
|
|
test "render a simple action with new explicit call to render" do
|
|
|
|
get "/render_implicit_action/simple/hello_world"
|
|
|
|
|
|
|
|
assert_body "Hello world!"
|
|
|
|
assert_status 200
|
|
|
|
end
|
|
|
|
|
|
|
|
test "render an action with a missing method and has special characters" do
|
|
|
|
get "/render_implicit_action/simple/hyphen-ated"
|
|
|
|
|
|
|
|
assert_body "Hello hyphen-ated!"
|
|
|
|
assert_status 200
|
|
|
|
end
|
2009-04-30 00:32:39 +00:00
|
|
|
end
|
2009-09-13 21:30:27 +00:00
|
|
|
end
|