Sha256: bc2fcb81abc3b85454c878d49ec731b490ac61f010455f341fe3c179cfd5343b
Contents?: true
Size: 1.78 KB
Versions: 2
Compression:
Stored size: 1.78 KB
Contents
require 'spec_helper' describe GitTopic do describe "#status" do describe "with pending review branches" do before( :each ) { use_repo 'in-progress' } after( :each ) { Dir.chdir '..' } it "should not show my review branches, but it should show others'" do git_remote_branches.should include "review/#{@user}/pirates" GitTopic.status @output.should_not be_nil @output.should_not =~ /^#\s*pirates\s*$/m @output.should =~ /^#\s*ninja-basic\s*$/m @output.should =~ /^#\s*zombie-basic\s*$/m end it "should not show others' rejected topics" do git_remote_branches.should include 'review/user24601/ninja-basic' GitTopic.review 'user24601/ninja-basic' GitTopic.reject git_remote_branches.should_not include 'review/user24601/ninja-basic' git_remote_branches.should include 'rejected/user24601/ninja-basic' @output.clear GitTopic.status @output.should_not =~ %r{ninja-basic} end it " should show my rejected topics, and note that they have comments, when they do. " do git_remote_branches.should include "rejected/#{@user}/krakens" GitTopic.status @output.should_not be_nil @output.should =~ /^#\s*krakens\s*\(reviewer comments\)\s*$/m end end describe "passed the --prepended flag" do before( :each ) { use_repo 'in-progress' } after( :each ) { Dir.chdir '..' } it "should invoke git status before producing its output" do GitTopic.status( :prepended => true ) @output.should_not be_nil @output.should =~ /# On branch master/ end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
git-topic-0.2.2 | spec/git_topic_status_spec.rb |
git-topic-0.2.1 | spec/git_topic_status_spec.rb |