Sha256: 2f527c125abffab1c8aa136ddb51a6ffa0f8ad25faa8d3c1957d4b05ce72bae7
Contents?: true
Size: 1.17 KB
Versions: 20
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' describe StoryPull do let(:command) { StoryPull.new } before { command.stub(:story_branch).and_return('6283185-tau-manifesto') } subject { command } its(:cmd) { should =~ /git pull/ } shared_examples "story-pull 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 pull/ } its(:cmd) { should =~ /git checkout #{command.story_branch}/ } end describe "with a custom development branch" do let(:command) { StoryPull.new(['-d', 'develop']) } its(:cmd) { should =~ /git checkout develop/ } end describe "with some unknown options" do let(:command) { StoryPull.new(['-d', 'develop', '-a', '-z', '--foo']) } it_should_behave_like "story-pull with known options" its(:cmd) { should =~ /git pull -a -z --foo/ } end describe "command-line command" do subject { `bin/git-story-pull --debug -z -d develop` } it { should =~ /git checkout develop/ } it { should =~ /git pull -z/ } end end
Version data entries
20 entries across 20 versions & 1 rubygems