-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
121 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper") | ||
|
||
module ControllerLayouts | ||
class ImplicitController < ::ApplicationController | ||
|
||
self.view_paths = [ActionView::FixtureTemplate::FixturePath.new( | ||
"layouts/application.html.erb" => "OMG <%= yield %> KTHXBAI", | ||
"basic.html.erb" => "Hello world!" | ||
)] | ||
|
||
def index | ||
render :template => "basic" | ||
end | ||
end | ||
|
||
class TestImplicitLayout < SimpleRouteCase | ||
describe "rendering a normal template, but using the implicit layout" | ||
|
||
get "/controller_layouts/implicit/index" | ||
assert_body "OMG Hello world! KTHXBAI" | ||
assert_status 200 | ||
end | ||
|
||
class ImplicitNameController < ::ApplicationController | ||
|
||
self.view_paths = [ActionView::FixtureTemplate::FixturePath.new( | ||
"layouts/controller_layouts/implicit_name.html.erb" => "OMGIMPLICIT <%= yield %> KTHXBAI", | ||
"basic.html.erb" => "Hello world!" | ||
)] | ||
|
||
def index | ||
render :template => "basic" | ||
end | ||
end | ||
|
||
class TestImplicitNamedLayout < SimpleRouteCase | ||
describe "rendering a normal template, but using an implicit NAMED layout" | ||
|
||
get "/controller_layouts/implicit_name/index" | ||
assert_body "OMGIMPLICIT Hello world! KTHXBAI" | ||
assert_status 200 | ||
end | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters