Commit e19c477e authored by Marin Usalj's avatar Marin Usalj

fixed more tests

parent f486920b
...@@ -39,9 +39,9 @@ describe Pod::Generator::Plist do ...@@ -39,9 +39,9 @@ describe Pod::Generator::Plist do
end end
it "writes a plist to disk at the given path" do it "writes a plist to disk at the given path" do
basepath = config.sandbox.root + "Pods-acknowledgements" basepath = environment.sandbox.root + "Pods-acknowledgements"
given_path = @generator.class.path_from_basepath(basepath) given_path = @generator.class.path_from_basepath(basepath)
expected_path = config.sandbox.root + "Pods-acknowledgements.plist" expected_path = environment.sandbox.root + "Pods-acknowledgements.plist"
Xcodeproj.expects(:write_plist).with(equals(@generator.plist), equals(expected_path)) Xcodeproj.expects(:write_plist).with(equals(@generator.plist), equals(expected_path))
@generator.save_as(given_path) @generator.save_as(given_path)
end end
......
...@@ -13,8 +13,8 @@ module Pod ...@@ -13,8 +13,8 @@ module Pod
platform :ios platform :ios
pod 'JSONKit' pod 'JSONKit'
end end
config.integrate_targets = false config.stubs(:integrate_targets).returns(false)
@installer = Installer.new(config.sandbox, podfile) @installer = Installer.new(environment.sandbox, podfile)
@installer.send(:analyze) @installer.send(:analyze)
@specs = @installer.aggregate_targets.first.pod_targets.first.specs @specs = @installer.aggregate_targets.first.pod_targets.first.specs
@installer.stubs(:installed_specs).returns(@specs) @installer.stubs(:installed_specs).returns(@specs)
...@@ -26,7 +26,7 @@ module Pod ...@@ -26,7 +26,7 @@ module Pod
describe "Public Hooks API" do describe "Public Hooks API" do
it "returns the sandbox root" do it "returns the sandbox root" do
@rep.sandbox_root.should == config.sandbox.root @rep.sandbox_root.should == environment.sandbox.root
end end
it "returns the pods project" do it "returns the pods project" do
...@@ -63,7 +63,7 @@ module Pod ...@@ -63,7 +63,7 @@ module Pod
describe "Unsafe Hooks API" do describe "Unsafe Hooks API" do
it "returns the sandbox" do it "returns the sandbox" do
@rep.sandbox.should == config.sandbox @rep.sandbox.should == environment.sandbox
end end
it "returns the config" do it "returns the config" do
......
...@@ -9,7 +9,7 @@ module Pod ...@@ -9,7 +9,7 @@ module Pod
xcodeproj 'dummy' xcodeproj 'dummy'
end end
@target_definition = @podfile.target_definitions['Pods'] @target_definition = @podfile.target_definitions['Pods']
@project = Project.new(environment.sandbox, nil) @project = Project.new(environment.sandbox.project_path)
environment.sandbox.project = @project environment.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib')) path_list = Sandbox::PathList.new(fixture('banana-lib'))
......
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