Commit 6aa0bb76 authored by Marius Rackwitz's avatar Marius Rackwitz

Minor change for edge case, more intuitive empty line generating

parent fdfca014
......@@ -35,10 +35,10 @@ module Pod
result = ""
result << generate_platform_import_header
unless imports.empty?
result << "\n"
imports.each do |import|
result << %|\n#import "#{import}"|
end
result << %|#import "#{import}"\n|
end
result
......
......@@ -38,8 +38,6 @@ module Pod
def generate
result = super
result << "\n"
unique_prefix_header_contents = file_accessors.map do |file_accessor|
file_accessor.spec_consumer.prefix_header_contents
end.compact.uniq
......
......@@ -9,7 +9,7 @@ module Pod
it 'includes the imports' do
@gen.imports << 'header.h'
@gen.generate.should == <<-EOS.strip_heredoc.chomp
@gen.generate.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h>
#import "header.h"
......@@ -31,6 +31,7 @@ module Pod
@gen.save_as(path)
path.read.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h>
EOS
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment