Commit cd314520 authored by Luis de la Rosa's avatar Luis de la Rosa

Added two tests for issue #1449 - however both are passing at the unit level so

I suspect that the issue will need to be tested at the integration test level.
parent f71718b1
...@@ -21,6 +21,51 @@ module Pod ...@@ -21,6 +21,51 @@ module Pod
EOS EOS
end end
it "does not duplicate the contents of the specification's prefix header when a subspec is declared" do
@spec.prefix_header_contents = '#import "BlocksKit.h"'
@spec.prefix_header_file = nil
# Declaring a subspec was found in issue #1449 to generate duplicates of the prefix_header_contents
@spec.subspec 'UI' do |subspec|
subspec.source_files = 'Source/UI/*.{h,m}'
end
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "BlocksKit.h"
EOS
end
it "does not duplicate the contents of the specification's prefix header when a subspec is declared multiple times" do
@spec.prefix_header_contents = '#import "BlocksKit.h"'
@spec.prefix_header_file = nil
# Declaring a subspec was found in issue #1449 to generate duplicates of the prefix_header_contents
@spec.subspec 'UI' do |su|
su.source_files = 'Source/UI/*.{h,m}'
end
@spec.subspec 'Helpers' do |sh|
sh.source_files = 'Source/Helpers/*.{h,m}'
end
@spec.subspec 'Additions' do |sa|
sa.source_files = 'Source/Additions/*.{h,m}'
end
@spec.subspec 'Dashboard' do |sd|
sd.source_files = 'Source/Dashboard/*.{h,m}'
sd.resources = 'Source/Dashboard/*.{xib}'
end
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "BlocksKit.h"
EOS
end
it "includes the contents of the specification's prefix header file" do it "includes the contents of the specification's prefix header file" do
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
......
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