Sha256: b696e28f3aeb5f2e60f82c5e9af8b31e6a62515fe48e7efe0c2fd09594c7221f

Contents?: true

Size: 452 Bytes

Versions: 18

Compression:

Stored size: 452 Bytes

Contents

require 'spec_helper'

describe Switch do

  let(:command) { Switch.new(['other-branch']) }
  before do
    command.stub(:current_branch).and_return('test-br')
    command.stub(:other_branch).and_return('other-branch')
  end
  subject { command }

  its(:cmd) { should match /git checkout #{command.other_branch}/ }

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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
git-utils-2.4.0 spec/commands/switch_spec.rb
git-utils-2.3.0 spec/commands/switch_spec.rb
git-utils-2.2.1 spec/commands/switch_spec.rb
git-utils-2.2.0 spec/commands/switch_spec.rb
git-utils-2.1.0 spec/commands/switch_spec.rb
git-utils-2.0.0 spec/commands/switch_spec.rb
git-utils-1.0.0 spec/commands/switch_spec.rb
git-utils-0.7.1 spec/commands/switch_spec.rb
git-utils-0.7.0 spec/commands/switch_spec.rb
git-utils-0.6.5 spec/commands/switch_spec.rb
git-utils-0.6.4 spec/commands/switch_spec.rb
git-utils-0.6.3 spec/commands/switch_spec.rb
git-utils-0.6.2 spec/commands/switch_spec.rb
git-utils-0.6.1 spec/commands/switch_spec.rb
git-utils-0.6.0 spec/commands/switch_spec.rb
git-utils-0.5.10 spec/commands/switch_spec.rb
git-utils-0.5.9 spec/commands/switch_spec.rb
git-utils-0.5.8 spec/commands/switch_spec.rb