diff options
author | Yehuda Katz and Carl Lerche <wycats@gmail.com> | 2009-03-23 18:06:47 -0700 |
---|---|---|
committer | Yehuda Katz and Carl Lerche <wycats@gmail.com> | 2009-03-23 18:06:47 -0700 |
commit | 1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a (patch) | |
tree | 35ae0a1a2e8cd0ed3a105fbc08ddcc08014cb976 /actionpack/test/new_base | |
parent | a501638e9dcf55e45613637c52e4169b6324f285 (diff) | |
download | rails-1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a.tar.gz rails-1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a.tar.bz2 rails-1d3e2c2b7333c90f2ef26fd0a3c6184aeaeb7e8a.zip |
In the middle of some refactoring... some fails due to changes in AbstractController not yet reflected in ActionController tests
Diffstat (limited to 'actionpack/test/new_base')
-rw-r--r-- | actionpack/test/new_base/render_text_test.rb | 11 | ||||
-rw-r--r-- | actionpack/test/new_base/test_helper.rb | 12 |
2 files changed, 17 insertions, 6 deletions
diff --git a/actionpack/test/new_base/render_text_test.rb b/actionpack/test/new_base/render_text_test.rb index b80a9b4a79..a20ca5fb8c 100644 --- a/actionpack/test/new_base/render_text_test.rb +++ b/actionpack/test/new_base/render_text_test.rb @@ -1,5 +1,8 @@ require File.join(File.expand_path(File.dirname(__FILE__)), "test_helper") +class ApplicationController < ActionController::Base2 +end + module HappyPath class RenderTextWithoutLayoutsController < ActionController::Base2 @@ -10,11 +13,11 @@ module HappyPath end end - class RenderTextWithLayoutsController < ActionController::Base2 + class RenderTextWithLayoutsController < ::ApplicationController self.view_paths = [ActionView::FixtureTemplate::FixturePath.new( "layouts/application.html.erb" => "<%= yield %>, I'm here!", "layouts/greetings.html.erb" => "<%= yield %>, I wish thee well." - )] + )] def render_hello_world render :text => "hello david" @@ -136,4 +139,6 @@ module HappyPath assert_body "hello world" assert_status 200 end -end
\ No newline at end of file +end + +ActionController::Base2.app_loaded!
\ No newline at end of file diff --git a/actionpack/test/new_base/test_helper.rb b/actionpack/test/new_base/test_helper.rb index e33b4239ad..c472a943e5 100644 --- a/actionpack/test/new_base/test_helper.rb +++ b/actionpack/test/new_base/test_helper.rb @@ -38,12 +38,18 @@ module ActionController include ActionController::Renderer def self.inherited(klass) - @subclasses ||= [] - @subclasses << klass.to_s + ::ActionController::Base2.subclasses << klass.to_s + super end def self.subclasses - @subclasses + @subclasses ||= [] + end + + def self.app_loaded! + @subclasses.each do |subclass| + subclass.constantize._write_layout_method + end end # append_view_path File.join(File.dirname(__FILE__), '..', 'fixtures') |