Sha256: d668a491482f8e95113d5a41c3f3b2dc1f70d3584ac683f8c2e55a7aaf620ec4
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
require 'git_tracker/repository' describe GitTracker::Repository do subject { described_class } describe '.root' do let(:git_command) { 'git rev-parse --show-toplevel' } before do subject.stub(:`).with(git_command) { "/path/to/git/repo/root\n" } end it "gets the path to the local Repository's top-level directory" do subject.root.should == '/path/to/git/repo/root' end it 'aborts when not in a git repository' do $?.stub(:exitstatus) { 128 } -> { subject.root }.should raise_error SystemExit end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git_tracker-1.0.0 | spec/git_tracker/repository_spec.rb |