Sha256: 7320ea8e7f16fb5dc506cba29f73176b1e1d9bad9f4b144da4f8c377c9095165

Contents?: true

Size: 787 Bytes

Versions: 69

Compression:

Stored size: 787 Bytes

Contents

RSpec.shared_examples "a git thin repository" do
  describe "cloning" do
    it "creates a working copy of the repo" do
      subject.clone(remote)
      expect(subject.exist?).to be_truthy
    end

    it "sets the remote origin url to the provided url" do
      subject.clone(remote)
      expect(subject.origin).to eq remote
    end

    it "sets the remote cache url to the path to the cache repo" do
      subject.clone(remote)
      expect(subject.cache).to eq cacherepo.git_dir.to_s
    end

    it "adds the cache repo to the alternates file" do
      subject.clone(remote)
      objectpath = cacherepo.git_dir + 'objects'
      alternates = subject.alternates.to_a
      expect(alternates.size).to eq 1
      expect(alternates[0]).to match_realpath objectpath
    end
  end
end

Version data entries

69 entries across 69 versions & 2 rubygems

Version Path
r10k-3.5.0 spec/shared-examples/git/thin_repository.rb
r10k-3.4.1 spec/shared-examples/git/thin_repository.rb
r10k-2.6.8 spec/shared-examples/git/thin_repository.rb
r10k-3.4.0 spec/shared-examples/git/thin_repository.rb
r10k-3.3.3 spec/shared-examples/git/thin_repository.rb
r10k-3.2.3 spec/shared-examples/git/thin_repository.rb
r10k-2.6.7 spec/shared-examples/git/thin_repository.rb
r10k-3.3.2 spec/shared-examples/git/thin_repository.rb
r10k-3.3.1 spec/shared-examples/git/thin_repository.rb
r10k-3.2.1 spec/shared-examples/git/thin_repository.rb
r10k-3.0.4 spec/shared-examples/git/thin_repository.rb
r10k-2.6.6 spec/shared-examples/git/thin_repository.rb
r10k-3.3.0 spec/shared-examples/git/thin_repository.rb
r10k-3.2.0 spec/shared-examples/git/thin_repository.rb
r10k-3.1.1 spec/shared-examples/git/thin_repository.rb
r10k-3.1.0 spec/shared-examples/git/thin_repository.rb
r10k-2.6.5 spec/shared-examples/git/thin_repository.rb
r10k-3.0.3 spec/shared-examples/git/thin_repository.rb
r10k-3.0.2 spec/shared-examples/git/thin_repository.rb
r10k-3.0.1 spec/shared-examples/git/thin_repository.rb