Commit efd19fd6 authored by Marius Rackwitz's avatar Marius Rackwitz Committed by Samuel E. Giddins

[Spec] Read the HEAD from the fixture repo

Don't break the spec everytime when comitting in the inner repo. That should ensure that we can keep the staging area in there clean.
parent 6010c8a5
...@@ -2,6 +2,8 @@ require File.expand_path('../../../spec_helper', __FILE__) ...@@ -2,6 +2,8 @@ require File.expand_path('../../../spec_helper', __FILE__)
module Pod module Pod
describe Installer::PodSourceInstaller do describe Installer::PodSourceInstaller do
FIXTURE_HEAD = Dir.chdir(SpecHelper.fixture('banana-lib')) { `git rev-parse HEAD`.chomp }
before do before do
@spec = fixture_spec('banana-lib/BananaLib.podspec') @spec = fixture_spec('banana-lib/BananaLib.podspec')
@spec.source = { :git => SpecHelper.fixture('banana-lib') } @spec.source = { :git => SpecHelper.fixture('banana-lib') }
...@@ -25,7 +27,7 @@ module Pod ...@@ -25,7 +27,7 @@ module Pod
config.sandbox.store_head_pod('BananaLib') config.sandbox.store_head_pod('BananaLib')
@spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' } @spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' }
@installer.install! @installer.install!
@installer.specific_source[:commit].should == '9c7802033af588bed9dd5cb089bc8998a65bbd29' @installer.specific_source[:commit].should == FIXTURE_HEAD
pod_folder = config.sandbox.pod_dir('BananaLib') pod_folder = config.sandbox.pod_dir('BananaLib')
pod_folder.should.exist pod_folder.should.exist
end end
...@@ -45,7 +47,7 @@ module Pod ...@@ -45,7 +47,7 @@ module Pod
sources = @installer.sandbox.checkout_sources sources = @installer.sandbox.checkout_sources
sources.should == { 'BananaLib' => { sources.should == { 'BananaLib' => {
:git => SpecHelper.fixture('banana-lib'), :git => SpecHelper.fixture('banana-lib'),
:commit => '9c7802033af588bed9dd5cb089bc8998a65bbd29' }, :commit => FIXTURE_HEAD },
} }
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