Skip to content
Browse files

Create archives of git fixture repos.

  • Loading branch information...
1 parent ff706d0 commit e636acd8cbc187b17715fc2c409aee5615d7510d @alloy alloy committed
1 spec/fixtures/banana-lib
@@ -1 +0,0 @@
-Subproject commit 0d06750e78e5a6653dc0f66776a257052328c146
View
BIN spec/fixtures/banana-lib.tar.gz
Binary file not shown.
1 spec/fixtures/master-spec-repo.git
@@ -1 +0,0 @@
-Subproject commit c807c4a9bff2af0ada17863065eb44bda0275a7d
View
BIN spec/fixtures/master-spec-repo.git.tar.gz
Binary file not shown.
View
4 spec/functional/command_spec.rb
@@ -7,6 +7,10 @@
extend SpecHelper::Log
extend SpecHelper::TemporaryDirectory
+ before do
+ fixture('master-spec-repo.git') # ensure the archive is unpacked
+ end
+
it "creates the local spec-repos directory and creates a clone of the `master' repo" do
command = Pod::Command.parse('setup')
def command.master_repo_url; SpecHelper.fixture('master-spec-repo.git'); end
View
9 spec/spec_helper/fixture.rb
@@ -7,7 +7,14 @@ module Fixture
ROOT = ::ROOT + 'spec/fixtures'
def fixture(name)
- ROOT + name
+ file = ROOT + name
+ unless file.exist?
+ archive = Pathname.new(file.to_s + '.tar.gz')
+ if archive.exist?
+ system "cd '#{archive.dirname}' && tar -zxvf '#{archive}' > /dev/null 2>&1"
+ end
+ end
+ file
end
module_function :fixture
end

0 comments on commit e636acd

Please sign in to comment.
Something went wrong with that request. Please try again.