Sha256: 797a7f63bbbe05e33315f8df9e76a9aa07a3b10447206d6d8786c0f547c70500
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper' describe StoryMerge do let(:command) { StoryMerge.new } before { command.stub(:story_branch).and_return('6283185-tau-manifesto') } subject { command } its(:cmd) { should =~ /git merge/ } shared_examples "story-merge 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 =~ /git checkout master/ } its(:cmd) { should =~ /git merge --no-ff --log #{command.story_branch}/ } end describe "with a custom development branch" do let(:command) { StoryMerge.new(['-d', 'develop']) } its(:cmd) { should =~ /git checkout develop/ } end describe "with some unknown options" do let(:command) { StoryMerge.new(['-d', 'develop', '-a', '-z', '--foo']) } it_should_behave_like "story-merge with known options" its(:cmd) { should =~ /-a -z --foo/ } end describe "command-line command" do subject { `bin/git-story-merge --debug -ff -d develop` } it { should =~ /git checkout develop/ } it { should =~ /git merge --no-ff --log -ff/ } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pivotal-github-0.8.0 | spec/commands/story_merge_spec.rb |