Sha256: 519796157ba700da9dc9986c47f539a9378e77c87aa93e5dec79b78eef7ccb6f

Contents?: true

Size: 792 Bytes

Versions: 33

Compression:

Stored size: 792 Bytes

Contents

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

describe Gitx::Cli::ShareCommand 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 '#share' do
    before do
      allow(cli).to receive(:say)

      expect(executor).to receive(:execute).with('git', 'push', 'origin', 'feature-branch').ordered
      expect(executor).to receive(:execute).with('git', 'track').ordered

      cli.share
    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/share_command_spec.rb
gitx-4.4.0 spec/gitx/cli/share_command_spec.rb
gitx-4.3.0 spec/gitx/cli/share_command_spec.rb
gitx-4.1.1 spec/gitx/cli/share_command_spec.rb
gitx-4.1.0 spec/gitx/cli/share_command_spec.rb
gitx-4.0.0 spec/gitx/cli/share_command_spec.rb
gitx-4.0.0.ci.234.1 spec/gitx/cli/share_command_spec.rb
gitx-3.2.0 spec/gitx/cli/share_command_spec.rb
gitx-3.2.0.ci.231.1 spec/gitx/cli/share_command_spec.rb
gitx-3.1.2 spec/gitx/cli/share_command_spec.rb
gitx-3.1.1 spec/gitx/cli/share_command_spec.rb
gitx-3.1.0.ci.216.1 spec/gitx/cli/share_command_spec.rb
gitx-3.1.0 spec/gitx/cli/share_command_spec.rb
gitx-3.0.2.ci.213.1 spec/gitx/cli/share_command_spec.rb
gitx-3.0.2.ci.207.1 spec/gitx/cli/share_command_spec.rb
gitx-3.0.2 spec/gitx/cli/share_command_spec.rb
gitx-3.0.1.ci.200.1 spec/gitx/cli/share_command_spec.rb
gitx-3.0.1 spec/gitx/cli/share_command_spec.rb
gitx-3.0.0.ci.188.1 spec/gitx/cli/share_command_spec.rb
gitx-3.0.0 spec/gitx/cli/share_command_spec.rb