Sha256: 0658459afd53bdce1233579a33a2577e783db68cbe5373cbfcc67bdfe6dab395
Contents?: true
Size: 923 Bytes
Versions: 1
Compression:
Stored size: 923 Bytes
Contents
require File.join(File.dirname(__FILE__), '../../spec_helper') require 'git_shizzle' describe 'Stage patches by index', :draft => true do let(:git) { GitShizzle::Git::Git.new(repo) } subject { GitShizzle::QuickGit.new(git) } context 'repository with modified files' do before (:each) do %w{ deleted modified }.each { |f| create f; stage f } `git commit --message Blah` delete 'deleted' modify 'modified' git.status[0].work_tree_status.should == :deleted git.status[1].work_tree_status.should == :modified end context 'when a modified file is staged' do it 'should run git add --patch' do git.stub(:command).and_call_original git.stub(:command).with(/add/, anything) expect(git).to receive(:command).with('add --patch --', ['modified']) subject.stage_with_patch 2 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git_shizzle-0.2.6 | spec/git-shizzle/builtin_commands/stage_patch_spec.rb |