Commit 40968ace authored by Boris Bügling's avatar Boris Bügling

Revert "Fix tests."

This reverts commit 782576c4bf19421534de0b34bba1895ee6df711b.
parent 9e2b0881
Subproject commit 0ce7a32ea385cf641ef76bd7f5a8166c554086d3 Subproject commit 9793ea0fa86ceb9656ed768e58fa3d6db1407dd7
...@@ -9,7 +9,7 @@ module Pod ...@@ -9,7 +9,7 @@ module Pod
it 'includes the imports' do it 'includes the imports' do
@gen.imports << 'header.h' @gen.imports << 'header.h'
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#import "header.h" #import "header.h"
EOS EOS
...@@ -18,18 +18,28 @@ module Pod ...@@ -18,18 +18,28 @@ module Pod
it 'includes the module imports' do it 'includes the module imports' do
@gen.module_imports << 'Module' @gen.module_imports << 'Module'
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
@import Module @import Module
EOS EOS
end 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 it 'writes the header file to the disk' do
path = temporary_directory + 'Test.h' path = temporary_directory + 'Test.h'
@gen.save_as(path) @gen.save_as(path)
path.read.should == <<-EOS.strip_heredoc path.read.should == <<-EOS.strip_heredoc
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
EOS EOS
end end
......
...@@ -13,7 +13,7 @@ module Pod ...@@ -13,7 +13,7 @@ module Pod
@spec.prefix_header_file = nil @spec.prefix_header_file = nil
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import "BlocksKit.h" #import "BlocksKit.h"
...@@ -29,7 +29,7 @@ module Pod ...@@ -29,7 +29,7 @@ module Pod
end end
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import "BlocksKit.h" #import "BlocksKit.h"
...@@ -50,7 +50,7 @@ module Pod ...@@ -50,7 +50,7 @@ module Pod
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import "BlocksKit.h" #import "BlocksKit.h"
...@@ -60,7 +60,7 @@ module Pod ...@@ -60,7 +60,7 @@ module Pod
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__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import <BananaTree/BananaTree.h> #import <BananaTree/BananaTree.h>
...@@ -79,7 +79,7 @@ module Pod ...@@ -79,7 +79,7 @@ module Pod
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import <BananaTree/BananaTree.h> #import <BananaTree/BananaTree.h>
...@@ -90,7 +90,7 @@ module Pod ...@@ -90,7 +90,7 @@ module Pod
@gen.imports << 'header.h' @gen.imports << 'header.h'
@gen.generate.should == <<-EOS.strip_heredoc @gen.generate.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import "header.h" #import "header.h"
...@@ -103,7 +103,7 @@ module Pod ...@@ -103,7 +103,7 @@ module Pod
@gen.save_as(path) @gen.save_as(path)
path.read.should == <<-EOS.strip_heredoc path.read.should == <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import <BananaTree/BananaTree.h> #import <BananaTree/BananaTree.h>
......
...@@ -191,7 +191,7 @@ module Pod ...@@ -191,7 +191,7 @@ module Pod
generated = @pod_target.prefix_header_path.read generated = @pod_target.prefix_header_path.read
expected = <<-EOS.strip_heredoc expected = <<-EOS.strip_heredoc
#ifdef __OBJC__ #ifdef __OBJC__
#import <Foundation/Foundation.h> #import <UIKit/UIKit.h>
#endif #endif
#import "BlocksKit.h" #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