Sha256: 77124510d260f5e9794e53154fa945917137092da62eb280758dd414983503e6
Contents?: true
Size: 1.51 KB
Versions: 72
Compression:
Stored size: 1.51 KB
Contents
# frozen_string_literal: true require 'avm/git/launcher/base' RSpec.describe ::Avm::Git::Launcher::Base do context 'new non-bare repository' do # rubocop:disable RSpec/ContextWording let(:repo) do r = described_class.new(::Dir.mktmpdir) r.git r end describe '#remote_exist?' do it { expect(repo.remote_exist?('origin')).to eq(false) } context 'after remote added' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups: before { repo.execute!('remote', 'add', 'origin', 'file:///path/to/remote') } it { expect(repo.remote_exist?('origin')).to eq(true) } context 'after remote removed' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups: before { repo.execute!('remote', 'remove', 'origin') } it { expect(repo.remote_exist?('origin')).to eq(false) } end end end describe '#assert_remote_url' do it { expect(repo.remote_exist?('origin')).to eq(false) } context 'after asserted remote URL "/remote1"' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups: before { repo.assert_remote_url('origin', '/remote1') } it { expect(repo.git.remote('origin').url).to eq('/remote1') } context 'after asserted remote URL "/remote2"' do # rubocop:disable RSpec/ContextWording, RSpec/NestedGroups: before { repo.assert_remote_url('origin', '/remote2') } it { expect(repo.git.remote('origin').url).to eq('/remote2') } end end end end end
Version data entries
72 entries across 72 versions & 1 rubygems