Sha256: 9d3e81611f145aeb22ac9dbdb296b21c453737560f710bfce9fa5c49ac98b2e0
Contents?: true
Size: 945 Bytes
Versions: 16
Compression:
Stored size: 945 Bytes
Contents
require 'spec_helper' require 'r10k/git/cache' describe R10K::Git::Cache do subject(:cache) { described_class.new('git://some/git/remote') } before do expect(cache).to receive(:execute).never end describe "updating the cache" do it "only updates the cache once" do expect(cache).to receive(:sync!).exactly(1).times cache.sync cache.sync end end describe "enumerating branches" do let(:refs) do %w[ refs/heads/master refs/heads/next refs/heads/next-fetch-errors refs/heads/next-update-forge-modules ].map { |line| line + "\n" }.join end it "lists local branches using git for-each-ref" do expect(cache).to receive(:git).with(%w[for-each-ref refs/heads --format %(refname)], anything).and_return(double(:stdout => refs)) expect(cache.branches).to eq %w[master next next-fetch-errors next-update-forge-modules] end end end
Version data entries
16 entries across 16 versions & 1 rubygems