Sha256: 06f76f890bb41cfb3f82200fd9a20a02de72725059c2331eb02396e25c153e50

Contents?: true

Size: 739 Bytes

Versions: 33

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'
require 'gitx/cli/track_command'

describe Gitx::Cli::TrackCommand do
  let(:args) { [] }
  let(:options) { {} }
  let(:config) do
    {
      pretend: true
    }
  end
  let(:cli) { described_class.new(args, options, config) }
  let(:executor) { cli.send(:executor) }
  let(:branch) { double('fake branch', name: 'feature-branch') }

  before do
    allow(cli).to receive(:current_branch).and_return(branch)
  end

  describe '#track' do
    before do
      allow(cli).to receive(:say)

      expect(executor).to receive(:execute).with('git', 'branch', '--set-upstream-to', 'origin/feature-branch').ordered

      cli.track
    end
    it 'runs expected commands' do
      should meet_expectations
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
gitx-4.5.0 spec/gitx/cli/track_command_spec.rb
gitx-4.4.0 spec/gitx/cli/track_command_spec.rb
gitx-4.3.0 spec/gitx/cli/track_command_spec.rb
gitx-4.1.1 spec/gitx/cli/track_command_spec.rb
gitx-4.1.0 spec/gitx/cli/track_command_spec.rb
gitx-4.0.0 spec/gitx/cli/track_command_spec.rb
gitx-4.0.0.ci.234.1 spec/gitx/cli/track_command_spec.rb
gitx-3.2.0 spec/gitx/cli/track_command_spec.rb
gitx-3.2.0.ci.231.1 spec/gitx/cli/track_command_spec.rb
gitx-3.1.2 spec/gitx/cli/track_command_spec.rb
gitx-3.1.1 spec/gitx/cli/track_command_spec.rb
gitx-3.1.0.ci.216.1 spec/gitx/cli/track_command_spec.rb
gitx-3.1.0 spec/gitx/cli/track_command_spec.rb
gitx-3.0.2.ci.213.1 spec/gitx/cli/track_command_spec.rb
gitx-3.0.2.ci.207.1 spec/gitx/cli/track_command_spec.rb
gitx-3.0.2 spec/gitx/cli/track_command_spec.rb
gitx-3.0.1.ci.200.1 spec/gitx/cli/track_command_spec.rb
gitx-3.0.1 spec/gitx/cli/track_command_spec.rb
gitx-3.0.0.ci.188.1 spec/gitx/cli/track_command_spec.rb
gitx-3.0.0 spec/gitx/cli/track_command_spec.rb