diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-10 05:54:46 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-10 05:54:46 +0000 |
commit | b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d (patch) | |
tree | affedc3593d216a6b5c4d1c27f84a0b3c7b19e46 /railties/test/generators/rails_resource_generator_test.rb | |
parent | c81fff2468bbf597457bf57cd599d2d4be77c715 (diff) | |
download | rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.tar.gz rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.tar.bz2 rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.zip |
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
Diffstat (limited to 'railties/test/generators/rails_resource_generator_test.rb')
-rw-r--r-- | railties/test/generators/rails_resource_generator_test.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/railties/test/generators/rails_resource_generator_test.rb b/railties/test/generators/rails_resource_generator_test.rb index 7aa06b645d..63cd284d35 100644 --- a/railties/test/generators/rails_resource_generator_test.rb +++ b/railties/test/generators/rails_resource_generator_test.rb @@ -46,7 +46,7 @@ if defined?(RAILS_ROOT) else RAILS_ROOT=tmp_dir end -Dir.mkdir(RAILS_ROOT) unless File.exists?(RAILS_ROOT) +Dir.mkdir(RAILS_ROOT) unless File.exist?(RAILS_ROOT) $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib" require 'rails_generator' @@ -57,15 +57,15 @@ class RailsResourceGeneratorTest < Test::Unit::TestCase def setup ActiveRecord::Base.pluralize_table_names = true - Dir.mkdir("#{RAILS_ROOT}/app") unless File.exists?("#{RAILS_ROOT}/app") - Dir.mkdir("#{RAILS_ROOT}/app/views") unless File.exists?("#{RAILS_ROOT}/app/views") - Dir.mkdir("#{RAILS_ROOT}/app/views/layouts") unless File.exists?("#{RAILS_ROOT}/app/views/layouts") - Dir.mkdir("#{RAILS_ROOT}/config") unless File.exists?("#{RAILS_ROOT}/config") - Dir.mkdir("#{RAILS_ROOT}/db") unless File.exists?("#{RAILS_ROOT}/db") - Dir.mkdir("#{RAILS_ROOT}/test") unless File.exists?("#{RAILS_ROOT}/test") - Dir.mkdir("#{RAILS_ROOT}/test/fixtures") unless File.exists?("#{RAILS_ROOT}/test/fixtures") - Dir.mkdir("#{RAILS_ROOT}/public") unless File.exists?("#{RAILS_ROOT}/public") - Dir.mkdir("#{RAILS_ROOT}/public/stylesheets") unless File.exists?("#{RAILS_ROOT}/public/stylesheets") + Dir.mkdir("#{RAILS_ROOT}/app") unless File.exist?("#{RAILS_ROOT}/app") + Dir.mkdir("#{RAILS_ROOT}/app/views") unless File.exist?("#{RAILS_ROOT}/app/views") + Dir.mkdir("#{RAILS_ROOT}/app/views/layouts") unless File.exist?("#{RAILS_ROOT}/app/views/layouts") + Dir.mkdir("#{RAILS_ROOT}/config") unless File.exist?("#{RAILS_ROOT}/config") + Dir.mkdir("#{RAILS_ROOT}/db") unless File.exist?("#{RAILS_ROOT}/db") + Dir.mkdir("#{RAILS_ROOT}/test") unless File.exist?("#{RAILS_ROOT}/test") + Dir.mkdir("#{RAILS_ROOT}/test/fixtures") unless File.exist?("#{RAILS_ROOT}/test/fixtures") + Dir.mkdir("#{RAILS_ROOT}/public") unless File.exist?("#{RAILS_ROOT}/public") + Dir.mkdir("#{RAILS_ROOT}/public/stylesheets") unless File.exist?("#{RAILS_ROOT}/public/stylesheets") File.open("#{RAILS_ROOT}/config/routes.rb", 'w') do |f| f<<"ActionController::Routing::Routes.draw do |map|\n\nend\n" end |