diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index c3896dfb..f4f1cecb 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -140,7 +140,10 @@ def create_skeleton_source_file(mock_project) if existing.empty? create_source_header_section(file, fullname, blank_project) else - file << existing << "\n" + file << existing + if existing[-1] != "\n" + file << "\n" + end end mock_project[:parsed_stuff][:functions].each do |function| create_function_skeleton(file, function, existing)