Replace File.exists? with File.exist?

File.exists? has been deprecated since Ruby 1.9.2

Yes, I am running the gem with warnings. :-)
This commit is contained in:
Joost Baaij 2014-06-14 17:10:05 +02:00 committed by Joshua Clayton
parent 2bf15e4530
commit 7e2bed5938
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module FactoryGirl
absolute_definition_file_paths = definition_file_paths.map { |path| File.expand_path(path) }
absolute_definition_file_paths.uniq.each do |path|
load("#{path}.rb") if File.exists?("#{path}.rb")
load("#{path}.rb") if File.exist?("#{path}.rb")
if File.directory? path
Dir[File.join(path, '**', '*.rb')].sort.each do |file|