Skip to content

Commit

Permalink
Merge pull request #73 from hujiko/master
Browse files Browse the repository at this point in the history
Use File.exist? instead of deprecated File.exists?
  • Loading branch information
brandonarbini committed Mar 11, 2015
2 parents 11e165b + cc386d5 commit 78a08a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/forgery/file_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def self.read_file(file)
def self.find_file(name, folder)
Forgery.load_paths.reverse.each do |path|
file = "#{path}/#{folder}/#{name}"
return file if File.exists?(file)
return file if File.exist?(file)
end
raise ArgumentError.new("File '#{name}' wasn't found in '#{folder}' folder. Searched paths: \n#{Forgery.load_paths.join('\n')}")
end
Expand Down

0 comments on commit 78a08a2

Please sign in to comment.