diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/basic_rendering_test.rb | 62 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 7 | ||||
-rw-r--r-- | railties/test/generators/namespaced_generators_test.rb | 2 |
3 files changed, 8 insertions, 63 deletions
diff --git a/railties/test/application/basic_rendering_test.rb b/railties/test/application/basic_rendering_test.rb deleted file mode 100644 index 00ba433a05..0000000000 --- a/railties/test/application/basic_rendering_test.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'isolation/abstract_unit' -require 'rack/test' - -module ApplicationTests - class BasicRenderingTest < ActiveSupport::TestCase - include ActiveSupport::Testing::Isolation - include Rack::Test::Methods - - def setup - build_app - end - - def teardown - teardown_app - end - - test "Rendering without ActionView" do - gsub_app_file 'config/application.rb', "require 'rails/all'", <<-RUBY - require "active_model/railtie" - require "action_controller/railtie" - RUBY - - # Turn off ActionView and jquery-rails (it depends on AV) - $:.reject! {|path| path =~ /(actionview|jquery\-rails)/ } - boot_rails - - app_file 'app/controllers/pages_controller.rb', <<-RUBY - class PagesController < ApplicationController - def render_hello_world - render text: "Hello World!" - end - - def render_nothing - render nothing: true - end - - def no_render; end - - def raise_error - render foo: "bar" - end - end - RUBY - - get '/pages/render_hello_world' - assert_equal 200, last_response.status - assert_equal "Hello World!", last_response.body - assert_equal "text/plain; charset=utf-8", last_response.content_type - - get '/pages/render_nothing' - assert_equal 200, last_response.status - assert_equal " ", last_response.body - assert_equal "text/plain; charset=utf-8", last_response.content_type - - get '/pages/no_render' - assert_equal 500, last_response.status - - get '/pages/raise_error' - assert_equal 500, last_response.status - end - end -end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index c51488e0e1..03a735b1c1 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -679,5 +679,12 @@ module ApplicationTests end assert_equal Logger::INFO, Rails.logger.level end + + test "respond_to? accepts include_private" do + make_basic_app + + assert_not Rails.configuration.respond_to?(:method_missing) + assert Rails.configuration.respond_to?(:method_missing, true) + end end end diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index a4d8b3d1b0..e17925ff65 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -44,7 +44,7 @@ class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase end end - def test_helpr_is_also_namespaced + def test_helper_is_also_namespaced run_generator assert_file "app/helpers/test_app/account_helper.rb", /module TestApp/, / module AccountHelper/ assert_file "test/helpers/test_app/account_helper_test.rb", /module TestApp/, / class AccountHelperTest/ |