aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/new_base/fixture_view_path_test.rb
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-03-23 12:07:34 -0700
committerYehuda Katz <wycats@gmail.com>2009-03-23 12:07:34 -0700
commit34f058e082754bb726a4753fa26e8e8c082702c0 (patch)
treee6257c788360580559500b99c00bc2f49c8317c0 /actionpack/test/new_base/fixture_view_path_test.rb
parent4a93148bfe0194acb7bcafd6c830d5b86372be6a (diff)
downloadrails-34f058e082754bb726a4753fa26e8e8c082702c0.tar.gz
rails-34f058e082754bb726a4753fa26e8e8c082702c0.tar.bz2
rails-34f058e082754bb726a4753fa26e8e8c082702c0.zip
Add a bunch of tests for various render :action, layout combinations
Diffstat (limited to 'actionpack/test/new_base/fixture_view_path_test.rb')
-rw-r--r--actionpack/test/new_base/fixture_view_path_test.rb60
1 files changed, 0 insertions, 60 deletions
diff --git a/actionpack/test/new_base/fixture_view_path_test.rb b/actionpack/test/new_base/fixture_view_path_test.rb
deleted file mode 100644
index 7792a14a20..0000000000
--- a/actionpack/test/new_base/fixture_view_path_test.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper")
-
-module HappyPath
-
- # This has no layout and it works
- class RenderActionLolController < ActionController::Base2
-
- self.view_paths = [ActionView::FixtureTemplate::FixturePath.new({
- "happy_path/render_action_lol/hello_world.html.erb" => "Hello world!",
- "happy_path/render_action_lol/goodbye_world.html.erb" => "Goodbye world!",
- "happy_path/sexy_time/borat.html.erb" => "I LIKE!!!"
- })]
-
- def render_action_hello_world
- render :action => "hello_world"
- end
-
- def render_action_goodbye_world
- render :action => "goodbye_world"
- end
-
- end
-
- class SexyTimeController < ActionController::Base2
- self.view_paths = [ActionView::FixtureTemplate::FixturePath.new({
- "happy_path/render_action_lol/hello_world.html.erb" => "Hello world!",
- "happy_path/render_action_lol/goodbye_world.html.erb" => "Goodbye world!",
- "happy_path/sexy_time/borat.html.erb" => "I LIKE!!!"
- })]
-
- def borat
- render "borat"
- end
- end
-
- class TestRenderHelloAction < SimpleRouteCase
-
- describe "Rendering an action using :action => <String>"
-
- get "/happy_path/render_action/render_action_hello_world"
- assert_body "Hello world!"
- assert_status 200
-
- end
-
- class TestRenderGoodbyeAction < SimpleRouteCase
- describe "Goodbye"
-
- get "/happy_path/render_action_lol/render_action_goodbye_world"
- assert_body "Goodbye world!"
- assert_status 200
- end
-
- class TestRenderBorat < SimpleRouteCase
- describe "Borat yo"
- get "/happy_path/sexy_time/borat"
- assert_body "I LIKE!!!"
- assert_status 200
- end
-end \ No newline at end of file