Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BridgeSupport] Run specs only if the executable is available.
- Loading branch information
1 parent
21e60f9
commit aaac7dd
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
describe "Pod::Generator::BridgeSupport" do | ||
it "generates a metadata file with the appropriate search paths" do | ||
headers = %w{ /some/dir/foo.h /some/dir/bar.h /some/other/dir/baz.h }.map { |h| Pathname.new(h) } | ||
generator = Pod::Generator::BridgeSupport.new(headers) | ||
def generator.gen_bridge_metadata(command) | ||
@command = command | ||
|
||
if `which gen_bridge_metadata`.strip.empty? | ||
puts " ! ".red << "Skipping because the `gen_bridge_metadata` executable can't be found." | ||
else | ||
it "generates a metadata file with the appropriate search paths" do | ||
headers = %w{ /some/dir/foo.h /some/dir/bar.h /some/other/dir/baz.h }.map { |h| Pathname.new(h) } | ||
generator = Pod::Generator::BridgeSupport.new(headers) | ||
def generator.gen_bridge_metadata(command) | ||
@command = command | ||
end | ||
generator.save_as(Pathname.new("/path/to/Pods.bridgesupport")) | ||
generator.instance_variable_get(:@command).should == | ||
%{-c "-I '/some/dir' -I '/some/other/dir'" -o '/path/to/Pods.bridgesupport' '#{headers.join("' '")}'} | ||
end | ||
generator.save_as(Pathname.new("/path/to/Pods.bridgesupport")) | ||
generator.instance_variable_get(:@command).should == | ||
%{-c "-I '/some/dir' -I '/some/other/dir'" -o '/path/to/Pods.bridgesupport' '#{headers.join("' '")}'} | ||
end | ||
end |