Commit 7d8ecf64 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[BridgeSupportSpec] Fix execution

parent 7d0a5c10
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../spec_helper', __FILE__)
describe 'Pod::Generator::BridgeSupport' do module Pod
if Executable.which('gen_bridge_metadata').nil? describe 'Pod::Generator::BridgeSupport' do
puts ' ! '.red << "Skipping because the `gen_bridge_metadata` executable can't be found." if Executable.which('gen_bridge_metadata').nil?
else puts ' ! '.red << "Skipping because the `gen_bridge_metadata` executable can't be found."
it 'generates a metadata file with the appropriate search paths' do else
headers = %w(/some/dir/foo.h /some/dir/bar.h /some/other/dir/baz.h).map { |h| Pathname.new(h) } it 'generates a metadata file with the appropriate search paths' do
generator = Pod::Generator::BridgeSupport.new(headers) headers = %w(/some/dir/foo.h /some/dir/bar.h /some/other/dir/baz.h).map { |h| Pathname.new(h) }
expected = ['-c', "-I '/some/dir' -I '/some/other/dir'", '-o', '/path/to/Pods.bridgesupport', *headers] generator = Generator::BridgeSupport.new(headers)
generator.expects(:gen_bridge_metadata).with { |*command| command.map(&:to_s) == expected.map(&:to_s) } expected = ['-c', "-I '/some/dir' -I '/some/other/dir'", '-o', '/path/to/Pods.bridgesupport', *headers]
generator.save_as(Pathname.new('/path/to/Pods.bridgesupport')) generator.expects(:gen_bridge_metadata).with { |*command| command.map(&:to_s) == expected.map(&:to_s) }
generator.save_as(Pathname.new('/path/to/Pods.bridgesupport'))
end
end end
end end
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