spec/commands/story_commit_spec.rb in pivotal-github-0.8.0 vs spec/commands/story_commit_spec.rb in pivotal-github-0.8.1

- old
+ new

@@ -1,27 +1,27 @@ require 'spec_helper' describe StoryCommit do let(:command) { StoryCommit.new(['-m', 'msg', '-a', '-z', '--foo']) } - before { command.stub(:story_branch).and_return('6283185-tau-manifesto') } + before { command.stub(:story_branch).and_return('62831853-tau-manifesto') } subject { command } it { should respond_to(:message) } shared_examples "story-commit with known options" do subject { command } - its(:cmd) { should =~ /git commit/ } + its(:cmd) { should match /git commit/ } its(:message) { should_not be_empty } its(:message?) { should be_true } its(:all?) { should be_true } describe "parse" do subject { command.options } - its(:message) { should == 'msg' } + its(:message) { should eq 'msg' } its(:all) { should be_true } end end describe "with only known options" do @@ -44,81 +44,81 @@ end end describe '#story_id' do subject { command.story_id } - it { should == '6283185' } + it { should eq '62831853' } end describe "command with message" do its(:cmd) do - should == %(git commit -a -m "msg" -m "[##{command.story_id}]" -z --foo) + should eq %(git commit -a -m "msg" -m "[##{command.story_id}]" -z --foo) end describe "when used with branches containing multiple stories" do before do - command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592') + command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926') end its(:cmd) do - delivered_ids = '#6283185 #3141592' - should == %(git commit -a -m "msg" -m "[#{delivered_ids}]" -z --foo) + delivered_ids = '#62831853 #31415926' + should eq %(git commit -a -m "msg" -m "[#{delivered_ids}]" -z --foo) end end end describe "command with no message" do let(:command) { StoryCommit.new(['-a', '-z', '--foo']) } its(:cmd) do - should == %(git commit -a -m "[##{command.story_id}]" -z --foo) + should eq %(git commit -a -m "[##{command.story_id}]" -z --foo) end end describe "command with finish flag" do let(:command) { StoryCommit.new(['-m', 'msg', '-f']) } its(:cmd) do - should == %(git commit -m "msg" -m "[Finishes ##{command.story_id}]") + should eq %(git commit -m "msg" -m "[Finishes ##{command.story_id}]") end describe "when used with branches containing multiple stories" do before do - command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592') + command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926') end its(:cmd) do - delivered_ids = '#6283185 #3141592' - should == %(git commit -m "msg" -m "[Finishes #{delivered_ids}]") + delivered_ids = '#62831853 #31415926' + should eq %(git commit -m "msg" -m "[Finishes #{delivered_ids}]") end end end describe "command with deliver flag" do let(:command) { StoryCommit.new(['-m', 'msg', '-d']) } its(:cmd) do - should == %(git commit -m "msg" -m "[Delivers ##{command.story_id}]") + should eq %(git commit -m "msg" -m "[Delivers ##{command.story_id}]") end describe "when used with branches containing multiple stories" do before do - command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592') + command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926') end its(:cmd) do - delivered_ids = '#6283185 #3141592' - should == %(git commit -m "msg" -m "[Delivers #{delivered_ids}]") + delivered_ids = '#62831853 #31415926' + should eq %(git commit -m "msg" -m "[Delivers #{delivered_ids}]") end end end describe "command with no story id" do before { command.stub(:story_branch).and_return('tau-manifesto') } its(:cmd) do - should == %(git commit -a -m "msg" -z --foo) + should eq %(git commit -a -m "msg" -z --foo) end end describe "command-line command" do let(:command) { `bin/git-story-commit -a -m "msg" -z --debug` } subject { command } - it { should =~ /git commit -a -m/ } - it { should =~ /msg/ } - it { should =~ /-z/ } - it { should_not =~ /--debug/ } + it { should match /git commit -a -m/ } + it { should match /msg/ } + it { should match /-z/ } + it { should_not match /--debug/ } end end \ No newline at end of file