Sha256: ed1f004aff5beb96b6348109d807081c710e29b410dc6debe1d53af7710a8006

Contents?: true

Size: 810 Bytes

Versions: 45

Compression:

Stored size: 810 Bytes

Contents

require 'spec_helper'
require 'thegarage/gitx/cli/share_command'

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

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

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

      expect(cli).to receive(:run_cmd).with('git push origin feature-branch').ordered
      expect(cli).to receive(:run_cmd).with('git branch --set-upstream-to origin/feature-branch').ordered

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

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
thegarage-gitx-2.14.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.13.1 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.13.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.12.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.11.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.10.2 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.10.1 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.10.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.9.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.8.1 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.8.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.7.2 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.7.1 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.7.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.6.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.5.1 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.5.0 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.5.0.beta5 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.5.0.beta4 spec/thegarage/gitx/cli/share_command_spec.rb
thegarage-gitx-2.5.0.beta3 spec/thegarage/gitx/cli/share_command_spec.rb