Sha256: 9882016fd84115e1f479b9d72d1a7f674161ececb9a9b16535c85f3a7fa8a3b0
Contents?: true
Size: 778 Bytes
Versions: 46
Compression:
Stored size: 778 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) { 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
46 entries across 46 versions & 1 rubygems