2009-03-19 16:35:39 -04:00
|
|
|
require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper")
|
|
|
|
|
2009-04-27 21:21:26 -04:00
|
|
|
module RenderImplicitAction
|
|
|
|
class SimpleController < ::ApplicationController
|
|
|
|
self.view_paths = [ActionView::Template::FixturePath.new(
|
|
|
|
"render_implicit_action/simple/hello_world.html.erb" => "Hello world!",
|
2009-04-29 20:32:39 -04:00
|
|
|
"render_implicit_action/simple/hyphen-ated.html.erb" => "Hello hyphen-ated!"
|
2009-04-27 21:21:26 -04:00
|
|
|
)]
|
|
|
|
|
|
|
|
def hello_world() end
|
2009-03-19 16:35:39 -04:00
|
|
|
end
|
|
|
|
|
2009-04-29 20:32:39 -04:00
|
|
|
class TestImplicitRender < SimpleRouteCase
|
|
|
|
describe "render a simple action with new explicit call to render"
|
|
|
|
|
|
|
|
get "/render_implicit_action/simple/hello_world"
|
|
|
|
assert_body "Hello world!"
|
|
|
|
assert_status 200
|
|
|
|
end
|
|
|
|
|
|
|
|
class TestImplicitWithSpecialCharactersRender < SimpleRouteCase
|
|
|
|
describe "render an action with a missing method and has special characters"
|
|
|
|
|
|
|
|
get "/render_implicit_action/simple/hyphen-ated"
|
|
|
|
assert_body "Hello hyphen-ated!"
|
|
|
|
assert_status 200
|
|
|
|
end
|
2009-03-19 16:35:39 -04:00
|
|
|
end
|