Permalink
Browse files

Merge pull request #9711 from vipulnsward/moar_cleanups

MOAR cleanups of unused variables.
  • Loading branch information...
2 parents a3c8e4a + d338a0f commit 36f7732e820ce4d3c4a46bd0a1b15fd8902467b3 @steveklabnik steveklabnik committed Mar 14, 2013
@@ -49,7 +49,7 @@ class Railtie < Rails::Railtie # :nodoc:
Rails.logger.extend ActiveSupport::Logger.broadcast console
end
- runner do |app|
+ runner do
require "active_record/base"
end
@@ -64,7 +64,7 @@ class Railtie < Rails::Railtie # :nodoc:
ActiveSupport.on_load(:active_record) { self.logger ||= ::Rails.logger }
end
- initializer "active_record.migration_error" do |app|
+ initializer "active_record.migration_error" do
if config.active_record.delete(:migration_error) == :page_load
config.app_middleware.insert_after "::ActionDispatch::Callbacks",
"ActiveRecord::Migration::CheckPending"
@@ -158,7 +158,7 @@ class Railtie < Rails::Railtie # :nodoc:
end
# Expose database runtime to controller for logging.
- initializer "active_record.log_runtime" do |app|
+ initializer "active_record.log_runtime" do
require "active_record/railties/controller_runtime"
ActiveSupport.on_load(:action_controller) do
include ActiveRecord::Railties::ControllerRuntime
@@ -84,7 +84,6 @@ def test_activerecord_model
assert_nothing_raised { x.save }
assert_nothing_raised { Group.find_by_order('y') }
assert_nothing_raised { Group.find(1) }
- x = Group.find(1)
end
# has_one association with reserved-word table name
@@ -95,7 +95,7 @@ def test_should_construct_new_finder_sql_after_create
def test_force_reload
firm = Firm.new("name" => "A New Firm, Inc")
firm.save
- firm.clients.each {|c|} # forcing to load all clients
+ firm.clients.each {} # forcing to load all clients
assert firm.clients.empty?, "New firm shouldn't have client objects"
assert_equal 0, firm.clients.size, "New firm should have 0 clients"
@@ -185,7 +185,7 @@ def test_checkout_behaviour
assert_not_nil connection
threads = []
4.times do |i|
- threads << Thread.new(i) do |pool_count|
+ threads << Thread.new(i) do
connection = pool.connection
assert_not_nil connection
connection.close

0 comments on commit 36f7732

Please sign in to comment.