Sha256: b36f93f8ae0c907cabb5a75857a7bc810980d482e2537fc9aa7a88e3c6087e77
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require 'spec_helper' describe MergeBranch do let(:command) { MergeBranch.new } before { command.stub(:current_branch).and_return('tau-manifesto') } subject { command } its(:cmd) { should match /git merge/ } shared_examples "merge-into-branch with known options" do subject { command } it "should not raise an error" do expect { command.parse }.not_to raise_error(OptionParser::InvalidOption) end end describe "with no options" do its(:cmd) { should match /git checkout master/ } end describe "with a custom development branch" do let(:command) { MergeBranch.new(['development']) } its(:cmd) { should match /git checkout development/ } end describe "with some unknown options" do let(:command) { MergeBranch.new(['dev', '-o', '-a', '-z', '--foo']) } it_should_behave_like "merge-into-branch with known options" its(:cmd) { should match /-a -z --foo/ } end describe "command-line command" do subject { `bin/git-merge-into-branch --debug development` } it { should match /git checkout development/ } it { should match /git merge --no-ff --log/ } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
git-utils-2.1.0 | spec/commands/merge_branch_spec.rb |
git-utils-2.0.0 | spec/commands/merge_branch_spec.rb |