diff --git a/lib/cmock_file_writer.rb b/lib/cmock_file_writer.rb index d7849d08..98c0b812 100644 --- a/lib/cmock_file_writer.rb +++ b/lib/cmock_file_writer.rb @@ -22,8 +22,8 @@ def create_file(filename, subdir) full_file_name_temp = "#{@config.mock_path}/#{subdir + '/' if subdir}#{filename}.new" full_file_name_done = "#{@config.mock_path}/#{subdir + '/' if subdir}#{filename}" - $stderr.puts "Creating #{full_file_name_done.inspect}" unless (@config.verbosity < 2) - + puts "Creating #{full_file_name_done.inspect}" unless (@config.verbosity < 2) + File.open(full_file_name_temp, 'w') do |file| yield(file, filename) end