diff options
| author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-04-04 02:43:12 +0530 |
|---|---|---|
| committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-04-04 02:43:12 +0530 |
| commit | 4ac719686c0075b6ad6896becfe0f058efdb97ff (patch) | |
| tree | 6255a8fc483436dc0fc89c0a2bc2755a51ecc329 /actionpack/test/controller/new_base | |
| parent | 4c76f6894889e8e3f5cc3722d928954c79422542 (diff) | |
| parent | 3e24e9ebc22f96f9124d3a5d1c83b93c1bea937d (diff) | |
| download | rails-4ac719686c0075b6ad6896becfe0f058efdb97ff.tar.gz rails-4ac719686c0075b6ad6896becfe0f058efdb97ff.tar.bz2 rails-4ac719686c0075b6ad6896becfe0f058efdb97ff.zip | |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/test/controller/new_base')
| -rw-r--r-- | actionpack/test/controller/new_base/render_implicit_action_test.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/actionpack/test/controller/new_base/render_implicit_action_test.rb b/actionpack/test/controller/new_base/render_implicit_action_test.rb index 9f69d20329..3bb3016fdb 100644 --- a/actionpack/test/controller/new_base/render_implicit_action_test.rb +++ b/actionpack/test/controller/new_base/render_implicit_action_test.rb @@ -3,8 +3,9 @@ require 'abstract_unit' module RenderImplicitAction class SimpleController < ::ApplicationController self.view_paths = [ActionView::FixtureResolver.new( - "render_implicit_action/simple/hello_world.html.erb" => "Hello world!", - "render_implicit_action/simple/hyphen-ated.html.erb" => "Hello hyphen-ated!" + "render_implicit_action/simple/hello_world.html.erb" => "Hello world!", + "render_implicit_action/simple/hyphen-ated.html.erb" => "Hello hyphen-ated!", + "render_implicit_action/simple/not_implemented.html.erb" => "Not Implemented" )] def hello_world() end @@ -24,5 +25,18 @@ module RenderImplicitAction assert_body "Hello hyphen-ated!" assert_status 200 end + + test "render an action called not_implemented" do + get "/render_implicit_action/simple/not_implemented" + + assert_body "Not Implemented" + assert_status 200 + end + + test "action_method? returns true for implicit actions" do + assert SimpleController.new.action_method?(:hello_world) + assert SimpleController.new.action_method?(:"hyphen-ated") + assert SimpleController.new.action_method?(:not_implemented) + end end end |
