Commit 9e2b0881 authored by Boris Bügling's avatar Boris Bügling

Fix tests.

parent b94a3e6d
Subproject commit 9793ea0fa86ceb9656ed768e58fa3d6db1407dd7
Subproject commit 0ce7a32ea385cf641ef76bd7f5a8166c554086d3
......@@ -9,7 +9,7 @@ module Pod
it 'includes the imports' do
@gen.imports << 'header.h'
@gen.generate.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "header.h"
EOS
......@@ -18,28 +18,18 @@ module Pod
it 'includes the module imports' do
@gen.module_imports << 'Module'
@gen.generate.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@import Module
EOS
end
it 'imports UIKit in iOS platforms' do
@gen.stubs(:platform).returns(Pod::Platform.ios)
@gen.generate.should.include?('#import <UIKit/UIKit.h>')
end
it 'imports Cocoa for OS X platforms' do
@gen.stubs(:platform).returns(Pod::Platform.osx)
@gen.generate.should.include?('#import <Cocoa/Cocoa.h>')
end
it 'writes the header file to the disk' do
path = temporary_directory + 'Test.h'
@gen.save_as(path)
path.read.should == <<-EOS.strip_heredoc
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
EOS
end
......
......@@ -13,7 +13,7 @@ module Pod
@spec.prefix_header_file = nil
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import "BlocksKit.h"
......@@ -29,7 +29,7 @@ module Pod
end
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import "BlocksKit.h"
......@@ -50,7 +50,7 @@ module Pod
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import "BlocksKit.h"
......@@ -60,7 +60,7 @@ module Pod
it "includes the contents of the specification's prefix header file" do
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import <BananaTree/BananaTree.h>
......@@ -79,7 +79,7 @@ module Pod
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import <BananaTree/BananaTree.h>
......@@ -90,7 +90,7 @@ module Pod
@gen.imports << 'header.h'
@gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import "header.h"
......@@ -103,7 +103,7 @@ module Pod
@gen.save_as(path)
path.read.should == <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import <BananaTree/BananaTree.h>
......
......@@ -191,7 +191,7 @@ module Pod
generated = @pod_target.prefix_header_path.read
expected = <<-EOS.strip_heredoc
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
#import "BlocksKit.h"
......
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