Commit 73f7f8c8 authored by Will Pragnell's avatar Will Pragnell

Improve Acknowledgements unit testing

parent dc260069
...@@ -2,22 +2,16 @@ require File.expand_path("../../../spec_helper", __FILE__) ...@@ -2,22 +2,16 @@ require File.expand_path("../../../spec_helper", __FILE__)
describe Pod::Generator::Acknowledgements do describe Pod::Generator::Acknowledgements do
before do before do
@podfile = Pod::Podfile.new do
platform :ios
xcodeproj "dummy"
end
@target_definition = @podfile.target_definitions[:default]
@sandbox = temporary_sandbox @sandbox = temporary_sandbox
@pods = [Pod::LocalPod.new(fixture_spec("banana-lib/BananaLib.podspec"), @sandbox, Pod::Platform.ios)] @target_definition = mock()
copy_fixture_to_pod("banana-lib", @pods[0]) @pods = [mock()]
@acknowledgements = Pod::Generator::Acknowledgements.new(@target_definition, @pods) @acknowledgements = Pod::Generator::Acknowledgements.new(@target_definition, @pods)
end end
it "calls save_as on both a Plist and a Markdown generator" do it "calls save_as on both a Plist and a Markdown generator" do
Pod::Generator::Plist.any_instance.expects(:save_as) path = @sandbox.root + "Pods-Acknowledgements.plist"
Pod::Generator::Markdown.any_instance.expects(:save_as) Pod::Generator::Plist.any_instance.expects(:save_as).with(equals(path))
path = @sandbox.root + "#{@target_definition.label}-Acknowledgements.plist" Pod::Generator::Markdown.any_instance.expects(:save_as).with(equals(path))
@acknowledgements.save_as(path) @acknowledgements.save_as(path)
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