Sha256: b1aacf0854d642bceea64622c8bdfa0cfe297ab81d687a2a18126958a85568c9

Contents?: true

Size: 680 Bytes

Versions: 11

Compression:

Stored size: 680 Bytes

Contents

require 'spec_helper'

describe Sync do

  let(:command) { Sync.new }
  before do
    command.stub(:current_branch).and_return('test-br')
  end
  subject { command }

  its(:cmd) { should match /git checkout master/ }
  its(:cmd) { should match /git pull/ }
  its(:cmd) { should match /git checkout #{command.current_branch}/ }

  describe "description" do
    let(:alternate_branch) { 'alternate' }
    before { command.stub(:known_options).and_return([alternate_branch]) }
    its(:cmd) { should match /git checkout #{alternate_branch}/ }
  end

  describe "command-line command" do
    subject { `bin/git-sync --debug` }
    it { should match /git checkout master/ }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
git-utils-2.4.0 spec/commands/sync_spec.rb
git-utils-2.3.0 spec/commands/sync_spec.rb
git-utils-2.2.1 spec/commands/sync_spec.rb
git-utils-2.2.0 spec/commands/sync_spec.rb
git-utils-2.1.0 spec/commands/sync_spec.rb
git-utils-2.0.0 spec/commands/sync_spec.rb
git-utils-1.0.0 spec/commands/sync_spec.rb
git-utils-0.7.1 spec/commands/sync_spec.rb
git-utils-0.7.0 spec/commands/sync_spec.rb
git-utils-0.6.5 spec/commands/sync_spec.rb
git-utils-0.6.4 spec/commands/sync_spec.rb