spec/support/file_helper.rb in rubocop-0.18.1 vs spec/support/file_helper.rb in rubocop-0.19.0
- old
+ new
@@ -5,10 +5,10 @@
module FileHelper
def create_file(file_path, content)
file_path = File.expand_path(file_path)
dir_path = File.dirname(file_path)
- FileUtils.makedirs dir_path unless File.exists?(dir_path)
+ FileUtils.makedirs dir_path unless File.exist?(dir_path)
File.open(file_path, 'w') do |file|
case content
when String
file.puts content