diff options
Diffstat (limited to 'railties/test')
22 files changed, 83 insertions, 190 deletions
diff --git a/railties/test/application/console_test.rb b/railties/test/application/console_test.rb index 5ae6323345..db8f1f2ac6 100644 --- a/railties/test/application/console_test.rb +++ b/railties/test/application/console_test.rb @@ -10,7 +10,8 @@ class ConsoleTest < Test::Unit::TestCase def load_environment(sandbox = false) require "#{rails_root}/config/environment" - Rails.application.load_console(sandbox) + Rails.application.sandbox = sandbox + Rails.application.load_console end def test_app_method_should_return_integration_session @@ -78,8 +79,8 @@ class ConsoleTest < Test::Unit::TestCase value = false Class.new(Rails::Railtie) do - console do |sandbox| - value = sandbox + console do |app| + value = app.sandbox? end end diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 8b840fffd0..1ca9515335 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -68,8 +68,7 @@ module ApplicationTests # Initialize the application require "#{app_path}/config/environment" - require "rails/generators" - Rails::Generators.configure! + Rails.application.load_generators assert_equal :rspec, Rails::Generators.options[:rails][:test_framework] assert_equal "-w", Rails::Generators.aliases[:rails][:test_framework] @@ -84,8 +83,7 @@ module ApplicationTests # Initialize the application require "#{app_path}/config/environment" - require "rails/generators" - Rails::Generators.configure! + Rails.application.load_generators assert_equal Thor::Base.shell, Thor::Shell::Basic end diff --git a/railties/test/application/initializers/notifications_test.rb b/railties/test/application/initializers/notifications_test.rb index 7e035be764..c87433db0d 100644 --- a/railties/test/application/initializers/notifications_test.rb +++ b/railties/test/application/initializers/notifications_test.rb @@ -33,7 +33,7 @@ module ApplicationTests wait assert_equal 1, logger.logged(:debug).size - assert_match /SHOW tables/, logger.logged(:debug).last + assert_match(/SHOW tables/, logger.logged(:debug).last) end end end diff --git a/railties/test/application/middleware/cache_test.rb b/railties/test/application/middleware/cache_test.rb index f582ed0e42..a8033d2b23 100644 --- a/railties/test/application/middleware/cache_test.rb +++ b/railties/test/application/middleware/cache_test.rb @@ -16,7 +16,7 @@ module ApplicationTests class ExpiresController < ApplicationController def expires_header expires_in 10, :public => !params[:private] - render :text => ActiveSupport::SecureRandom.hex(16) + render :text => SecureRandom.hex(16) end def expires_etag @@ -30,7 +30,7 @@ module ApplicationTests private def render_conditionally(headers) if stale?(headers.merge(:public => !params[:private])) - render :text => ActiveSupport::SecureRandom.hex(16) + render :text => SecureRandom.hex(16) end end end diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 8bfde00af5..715798ca08 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -200,4 +200,4 @@ module ApplicationTests AppTemplate::Application.middleware.map(&:klass).map(&:name) end end -end +end
\ No newline at end of file diff --git a/railties/test/application/paths_test.rb b/railties/test/application/paths_test.rb index b1ff6e9cb1..03e0247556 100644 --- a/railties/test/application/paths_test.rb +++ b/railties/test/application/paths_test.rb @@ -61,7 +61,7 @@ module ApplicationTests end test "environments has a glob equal to the current environment" do - assert_equal "#{Rails.env}.rb", @paths.config.environments.glob + assert_equal "#{Rails.env}.rb", @paths["config/environments"].glob end test "load path includes each of the paths in config.paths as long as the directories exist" do diff --git a/railties/test/application/rack/logger_test.rb b/railties/test/application/rack/logger_test.rb index a29244357c..715af5c642 100644 --- a/railties/test/application/rack/logger_test.rb +++ b/railties/test/application/rack/logger_test.rb @@ -21,19 +21,19 @@ module ApplicationTests test "logger logs proper HTTP verb and path" do get "/blah" wait - assert_match /^Started GET "\/blah"/, logs[0] + assert_match(/^Started GET "\/blah"/, logs[0]) end test "logger logs HTTP verb override" do post "/", {:_method => 'put'} wait - assert_match /^Started PUT "\/"/, logs[0] + assert_match(/^Started PUT "\/"/, logs[0]) end test "logger logs HEAD requests" do post "/", {:_method => 'head'} wait - assert_match /^Started HEAD "\/"/, logs[0] + assert_match(/^Started HEAD "\/"/, logs[0]) end end end diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index d77c2d14ab..ab36ace5e5 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -31,7 +31,7 @@ module ApplicationTests AppTemplate::Application.initialize! RUBY - assert_match "SuperMiddleware", Dir.chdir(app_path){ `rake middleware` } + assert_match("SuperMiddleware", Dir.chdir(app_path){ `rake middleware` }) end def test_initializers_are_executed_in_rake_tasks @@ -93,16 +93,16 @@ module ApplicationTests end output = Dir.chdir(app_path){ `rake db:migrate` } - assert_match /create_table\(:users\)/, output - assert_match /CreateUsers: migrated/, output - assert_match /add_column\(:users, :email, :string\)/, output - assert_match /AddEmailToUsers: migrated/, output + assert_match(/create_table\(:users\)/, output) + assert_match(/CreateUsers: migrated/, output) + assert_match(/add_column\(:users, :email, :string\)/, output) + assert_match(/AddEmailToUsers: migrated/, output) output = Dir.chdir(app_path){ `rake db:rollback STEP=2` } - assert_match /drop_table\("users"\)/, output - assert_match /CreateUsers: reverted/, output - assert_match /remove_column\("users", :email\)/, output - assert_match /AddEmailToUsers: reverted/, output + assert_match(/drop_table\("users"\)/, output) + assert_match(/CreateUsers: reverted/, output) + assert_match(/remove_column\("users", :email\)/, output) + assert_match(/AddEmailToUsers: reverted/, output) end def test_loading_specific_fixtures diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 42fe7a7fea..c31c65a27d 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -136,7 +136,9 @@ class AppGeneratorTest < Rails::Generators::TestCase run_generator([destination_root, "-d", "jdbcmysql"]) assert_file "config/database.yml", /jdbcmysql/ assert_file "Gemfile", /^gem\s+["']activerecord-jdbcmysql-adapter["']$/ - assert_file "Gemfile", /^gem\s+["']jruby-openssl["']$/ if defined?(JRUBY_VERSION) && JRUBY_VERSION < "1.6" + # TODO: When the JRuby guys merge jruby-openssl in + # jruby this will be removed + assert_file "Gemfile", /^gem\s+["']jruby-openssl["']$/ if defined?(JRUBY_VERSION) end def test_config_jdbcsqlite3_database @@ -172,7 +174,6 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_jquery_is_the_default_javascript_library run_generator - assert_file "config/application.rb", /#\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(prototype prototype_ujs\)/ assert_file "app/assets/javascripts/application.js" do |contents| assert_match %r{^//= require jquery}, contents assert_match %r{^//= require jquery_ujs}, contents @@ -184,7 +185,6 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_other_javascript_libraries run_generator [destination_root, '-j', 'prototype'] - assert_file "config/application.rb", /#\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(prototype prototype_ujs\)/ assert_file "app/assets/javascripts/application.js" do |contents| assert_match %r{^//= require prototype}, contents assert_match %r{^//= require prototype_ujs}, contents @@ -196,7 +196,6 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_javascript_is_skipped_if_required run_generator [destination_root, "--skip-javascript"] - assert_file "config/application.rb", /^\s+# config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(\)/ assert_file "app/assets/javascripts/application.js" do |contents| assert_no_match %r{^//=\s+require\s}, contents end diff --git a/railties/test/generators/assets_generator_test.rb b/railties/test/generators/assets_generator_test.rb index 375632e5bc..2d20982d04 100644 --- a/railties/test/generators/assets_generator_test.rb +++ b/railties/test/generators/assets_generator_test.rb @@ -9,17 +9,17 @@ class AssetsGeneratorTest < Rails::Generators::TestCase def test_assets run_generator assert_file "app/assets/javascripts/posts.js.coffee" - assert_file "app/assets/stylesheets/posts.css.scss" + assert_file "app/assets/stylesheets/posts.css" end def test_skipping_assets content = run_generator ["posts", "--no-stylesheets", "--no-javascripts"] assert_no_file "app/assets/javascripts/posts.js.coffee" - assert_no_file "app/assets/stylesheets/posts.css.scss" + assert_no_file "app/assets/stylesheets/posts.css" end def test_vanilla_assets - run_generator ["posts", "--no-javascript-engine", "--no-stylesheet-engine"] + run_generator ["posts", "--no-javascript-engine"] assert_file "app/assets/javascripts/posts.js" assert_file "app/assets/stylesheets/posts.css" end diff --git a/railties/test/generators/controller_generator_test.rb b/railties/test/generators/controller_generator_test.rb index 46533b70be..3adf7be118 100644 --- a/railties/test/generators/controller_generator_test.rb +++ b/railties/test/generators/controller_generator_test.rb @@ -40,7 +40,7 @@ class ControllerGeneratorTest < Rails::Generators::TestCase def test_invokes_assets run_generator assert_file "app/assets/javascripts/account.js.coffee" - assert_file "app/assets/stylesheets/account.css.scss" + assert_file "app/assets/stylesheets/account.css" end def test_invokes_default_test_framework diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 1b9a8fd8a7..7fdd54fc30 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -12,7 +12,7 @@ Rails.application.config.generators.templates = [File.join(Rails.root, "lib", "t # Call configure to load the settings from # Rails.application.config.generators to Rails::Generators -Rails::Generators.configure! +Rails.application.load_generators require 'active_record' require 'action_dispatch' diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 6f8a9b4280..17cbac0912 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -252,7 +252,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase assert_file "test/unit/helpers/test_app/product_lines_helper_test.rb" # Stylesheets - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" end def test_scaffold_on_revoke @@ -283,7 +283,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase assert_no_file "test/unit/helpers/test_app/product_lines_helper_test.rb" # Stylesheets (should not be removed) - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" end def test_scaffold_with_namespace_on_invoke @@ -324,7 +324,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase assert_file "test/unit/helpers/test_app/admin/roles_helper_test.rb" # Stylesheets - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" end def test_scaffold_with_namespace_on_revoke @@ -356,6 +356,6 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase assert_no_file "test/unit/helpers/test_app/admin/roles_helper_test.rb" # Stylesheets (should not be removed) - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" end end diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb deleted file mode 100644 index 5c0774ddbd..0000000000 --- a/railties/test/generators/plugin_generator_test.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'generators/generators_test_helper' -require 'rails/generators/rails/plugin/plugin_generator' - -class PluginGeneratorTest < Rails::Generators::TestCase - include GeneratorsTestHelper - arguments %w(plugin_fu) - - def test_plugin_skeleton_is_created - silence(:stderr) { run_generator } - year = Date.today.year - - %w( - vendor/plugins - vendor/plugins/plugin_fu - vendor/plugins/plugin_fu/init.rb - vendor/plugins/plugin_fu/install.rb - vendor/plugins/plugin_fu/uninstall.rb - vendor/plugins/plugin_fu/lib - vendor/plugins/plugin_fu/lib/plugin_fu.rb - vendor/plugins/plugin_fu/Rakefile - ).each{ |path| assert_file path } - - %w( - vendor/plugins/plugin_fu/README - ).each{ |path| assert_file path, /PluginFu/ } - - %w( - vendor/plugins/plugin_fu/README - vendor/plugins/plugin_fu/MIT-LICENSE - ).each{ |path| assert_file path, /#{year}/ } - end - - def test_check_class_collision - content = capture(:stderr){ run_generator ["object"] } - assert_match(/The name 'Object' is either already used in your application or reserved/, content) - end - - def test_invokes_default_test_framework - silence(:stderr) { run_generator } - assert_file "vendor/plugins/plugin_fu/test/plugin_fu_test.rb", /class PluginFuTest < ActiveSupport::TestCase/ - assert_file "vendor/plugins/plugin_fu/test/test_helper.rb" - end - - def test_logs_if_the_test_framework_cannot_be_found - content = nil - silence(:stderr) { content = run_generator ["plugin_fu", "--test-framework=rspec"] } - assert_match(/rspec \[not found\]/, content) - end - - def test_creates_tasks_if_required - silence(:stderr) { run_generator ["plugin_fu", "--tasks"] } - assert_file "vendor/plugins/plugin_fu/lib/tasks/plugin_fu_tasks.rake" - end - - def test_creates_generator_if_required - silence(:stderr) { run_generator ["plugin_fu", "--generator"] } - assert_file "vendor/plugins/plugin_fu/lib/generators/templates" - assert_file "vendor/plugins/plugin_fu/lib/generators/plugin_fu_generator.rb", - /class PluginFuGenerator < Rails::Generators::NamedBase/ - end - - def test_plugin_generator_on_revoke - silence(:stderr) { run_generator } - run_generator ["plugin_fu"], :behavior => :revoke - end - - def test_deprecation - output = capture(:stderr) { run_generator } - assert_match(/Plugin generator is deprecated, please use 'rails plugin new' command to generate plugin structure./, output) - end -end diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 297ac5d238..b93e33f61a 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -169,6 +169,19 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_file "app/views/layouts/bukkits/application.html.erb", /<title>Bukkits<\/title>/ end + def test_creating_gemspec + run_generator + assert_file "bukkits.gemspec", /s.name = "bukkits"/ + assert_file "bukkits.gemspec", /s.files = Dir\["\{app,config,lib\}\/\*\*\/\*"\]/ + assert_file "bukkits.gemspec", /s.test_files = Dir\["test\/\*\*\/\*"\]/ + assert_file "bukkits.gemspec", /s.version = "0.0.1"/ + end + + def test_shebang + run_generator + assert_file "script/rails", /#!\/usr\/bin\/env ruby/ + end + def test_passing_dummy_path_as_a_parameter run_generator [destination_root, "--dummy_path", "spec/dummy"] assert_file "spec/dummy" @@ -176,6 +189,21 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_no_file "test/dummy" end + def test_creating_dummy_without_tests_but_with_dummy_path + run_generator [destination_root, "--dummy_path", "spec/dummy", "--skip-test-unit"] + assert_file "spec/dummy" + assert_file "spec/dummy/config/application.rb" + assert_no_file "test" + end + + def test_skipping_test_unit + run_generator [destination_root, "--skip-test-unit"] + assert_no_file "test" + assert_file "bukkits.gemspec" do |contents| + assert_no_match /s.test_files = Dir\["test\/\*\*\/\*"\]/, contents + end + end + def test_skipping_gemspec run_generator [destination_root, "--skip-gemspec"] assert_no_file "bukkits.gemspec" diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index 4b07f8bcbe..2135ffac81 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -80,9 +80,9 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_file "test/unit/helpers/product_lines_helper_test.rb" # Assets - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" assert_file "app/assets/javascripts/product_lines.js.coffee" - assert_file "app/assets/stylesheets/product_lines.css.scss" + assert_file "app/assets/stylesheets/product_lines.css" end def test_scaffold_on_revoke @@ -113,9 +113,9 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_no_file "test/unit/helpers/product_lines_helper_test.rb" # Assets - assert_file "app/assets/stylesheets/scaffold.css.scss", /&:visited/ + assert_file "app/assets/stylesheets/scaffold.css", /:visited/ assert_no_file "app/assets/javascripts/product_lines.js.coffee" - assert_no_file "app/assets/stylesheets/product_lines.css.scss" + assert_no_file "app/assets/stylesheets/product_lines.css" end def test_scaffold_with_namespace_on_invoke @@ -189,9 +189,9 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_file "test/unit/helpers/admin/roles_helper_test.rb" # Assets - assert_file "app/assets/stylesheets/scaffold.css.scss", /&:visited/ + assert_file "app/assets/stylesheets/scaffold.css", /:visited/ assert_file "app/assets/javascripts/admin/roles.js.coffee" - assert_file "app/assets/stylesheets/admin/roles.css.scss" + assert_file "app/assets/stylesheets/admin/roles.css" end def test_scaffold_with_namespace_on_revoke @@ -223,9 +223,9 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase assert_no_file "test/unit/helpers/admin/roles_helper_test.rb" # Assets - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" assert_no_file "app/assets/javascripts/admin/roles.js.coffee" - assert_no_file "app/assets/stylesheets/admin/roles.css.scss" + assert_no_file "app/assets/stylesheets/admin/roles.css" end def test_scaffold_generator_on_revoke_does_not_mutilate_legacy_map_parameter @@ -245,27 +245,27 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase def test_scaffold_generator_no_assets run_generator [ "posts", "--no-assets" ] - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" assert_no_file "app/assets/javascripts/posts.js.coffee" - assert_no_file "app/assets/stylesheets/posts.css.scss" + assert_no_file "app/assets/stylesheets/posts.css" end def test_scaffold_generator_no_stylesheets run_generator [ "posts", "--no-stylesheets" ] - assert_no_file "app/assets/stylesheets/scaffold.css.scss" + assert_no_file "app/assets/stylesheets/scaffold.css" assert_file "app/assets/javascripts/posts.js.coffee" - assert_no_file "app/assets/stylesheets/posts.css.scss" + assert_no_file "app/assets/stylesheets/posts.css" end def test_scaffold_generator_no_javascripts run_generator [ "posts", "--no-javascripts" ] - assert_file "app/assets/stylesheets/scaffold.css.scss" + assert_file "app/assets/stylesheets/scaffold.css" assert_no_file "app/assets/javascripts/posts.js.coffee" - assert_file "app/assets/stylesheets/posts.css.scss" + assert_file "app/assets/stylesheets/posts.css" end - def test_scaffold_generator_no_negines - run_generator [ "posts", "--no-javascript-engine", "--no-stylesheet-engine" ] + def test_scaffold_generator_no_engines + run_generator [ "posts", "--no-javascript-engine" ] assert_file "app/assets/stylesheets/scaffold.css" assert_file "app/assets/javascripts/posts.js" assert_file "app/assets/stylesheets/posts.css" diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index 1264ac7764..301ae80bcf 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -185,13 +185,6 @@ class GeneratorsTest < Rails::Generators::TestCase Rails::Generators.subclasses.delete(WithOptionsGenerator) end - def test_load_generators_from_railties - Rails::Generators::ModelGenerator.expects(:start).with(["Account"], {}) - Rails::Generators.send(:remove_instance_variable, :@generators_from_railties) - Rails.application.expects(:load_generators) - Rails::Generators.invoke("model", ["Account"]) - end - def test_rails_root_templates template = File.join(Rails.root, "lib", "templates", "active_record", "model", "model.rb") diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index f2261540ca..69208ce4c3 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -8,9 +8,8 @@ # Rails booted up. require 'fileutils' -# TODO: Remove rubygems when possible -require 'rubygems' require 'test/unit' +require 'rubygems' # TODO: Remove setting this magic constant RAILS_FRAMEWORK_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../..") diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index 6e4e3446b3..c0f3887263 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -227,57 +227,4 @@ class PathsTest < ActiveSupport::TestCase assert @root["app"].autoload? assert_equal ["/app"], @root.autoload_paths end - - # Deprecated API tests - - test "reading a root level path with assignment" do - @root.add "app" - assert_deprecated do - assert_equal ["/foo/bar/app"], @root.app.to_a - end - end - - test "creating a root level path with assignment" do - assert_deprecated do - @root.app = "/foo/bar" - end - assert_equal ["/foo/bar"], @root["app"].to_a - end - - test "creating a root level path without assignment" do - assert_deprecated do - @root.app "/foo/bar" - end - assert_equal ["/foo/bar"], @root["app"].to_a - end - - test "reading a nested level path with assignment" do - @root.add "app" - @root.add "app/model" - assert_deprecated do - assert_equal ["/foo/bar/app/model"], @root.app.model.to_a - end - end - - test "creating a nested level path with assignment" do - @root.add "app" - assert_deprecated do - @root.app.model = "/foo/bar" - end - assert_equal ["/foo/bar"], @root["app/model"].to_a - end - - test "creating a nested level path without assignment" do - @root.add "app" - assert_deprecated do - @root.app.model "/foo/bar" - end - assert_equal ["/foo/bar"], @root["app/model"].to_a - end - - test "trying to access a path that does not exist raises NoMethodError" do - assert_deprecated do - assert_raises(NoMethodError) { @root.app } - end - end end diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb index 9d194f41a6..8a9363fb80 100644 --- a/railties/test/rails_info_controller_test.rb +++ b/railties/test/rails_info_controller_test.rb @@ -1,5 +1,4 @@ require 'abstract_unit' -require 'action_controller' module ActionController class Base diff --git a/railties/test/railties/railtie_test.rb b/railties/test/railties/railtie_test.rb index 7ea8364ae9..18fdf59fe3 100644 --- a/railties/test/railties/railtie_test.rb +++ b/railties/test/railties/railtie_test.rb @@ -97,7 +97,7 @@ module RailtiesTest assert !$ran_block require 'rake' require 'rake/testtask' - require 'rake/rdoctask' + require 'rdoc/task' AppTemplate::Application.load_tasks assert $ran_block @@ -121,7 +121,7 @@ module RailtiesTest assert_equal [], $ran_block require 'rake' require 'rake/testtask' - require 'rake/rdoctask' + require 'rdoc/task' AppTemplate::Application.load_tasks assert $ran_block.include?("my_tie") diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index e5debf29ae..659551d08a 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -237,7 +237,7 @@ module RailtiesTest boot_rails require 'rake' - require 'rake/rdoctask' + require 'rdoc/task' require 'rake/testtask' Rails.application.load_tasks Rake::Task[:foo].invoke |