Sha256: 8fe7e58bfb86f39ef67277dec9d96fc5606586b48968f3021f6e66140739afa6
Contents?: true
Size: 1.8 KB
Versions: 5
Compression:
Stored size: 1.8 KB
Contents
require 'spec_helper' describe GitTopic do describe "#status" do describe "with pending review branches" do before( :each ) { use_repo 'in-progress' } 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 =~ %r{^\s*(#.*)}m status_output = $1 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' } 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
5 entries across 5 versions & 1 rubygems