From b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 10 Dec 2007 05:54:46 +0000 Subject: Ruby 1.9 compat: File.exists\? -> File.exist\? en masse. References #1689 [Pratik Naik] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/aaa_create_tables_test.rb | 4 ++-- activerecord/test/associations_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/aaa_create_tables_test.rb b/activerecord/test/aaa_create_tables_test.rb index 3db6cb52d0..7703c76a35 100644 --- a/activerecord/test/aaa_create_tables_test.rb +++ b/activerecord/test/aaa_create_tables_test.rb @@ -33,12 +33,12 @@ class AAACreateTablesTest < Test::Unit::TestCase private def use_migrations? unittest_sql_filename = ActiveRecord::Base.connection.adapter_name.downcase + ".sql" - not File.exists? "#{@base_path}/#{unittest_sql_filename}" + not File.exist? "#{@base_path}/#{unittest_sql_filename}" end def use_migrations_for_courses? unittest2_sql_filename = ActiveRecord::Base.connection.adapter_name.downcase + "2.sql" - not File.exists? "#{@base_path}/#{unittest2_sql_filename}" + not File.exist? "#{@base_path}/#{unittest2_sql_filename}" end def recreate(base, suffix = nil) diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 64dc34066a..e35233a1b8 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -55,7 +55,7 @@ class AssociationsTest < Test::Unit::TestCase def test_storing_in_pstore require "tmpdir" store_filename = File.join(Dir.tmpdir, "ar-pstore-association-test") - File.delete(store_filename) if File.exists?(store_filename) + File.delete(store_filename) if File.exist?(store_filename) require "pstore" apple = Firm.create("name" => "Apple") natural = Client.new("name" => "Natural Company") -- cgit v1.2.3