Sha256: 321617b94fa8a0e62800a448fed2d8e655563dc8ece45ee9a19dc66cd0d8ae6b

Contents?: true

Size: 829 Bytes

Versions: 2

Compression:

Stored size: 829 Bytes

Contents

require 'spec_helper'

describe Blaggard::Git do
  subject { Blaggard::Git }
  before do
    @git = subject.new(TestEnv.repo_path)
  end
  it 'should correctly order the refs by time' do
    expected = ["refs/heads/subtrees", "refs/heads/master", "refs/heads/not-good",
                "refs/heads/test", "refs/heads/chomped", "refs/heads/trailing",
                "refs/heads/br2", "refs/heads/cannot-fetch", "refs/heads/track-local",
                "refs/heads/packed-test", "refs/heads/packed", "refs/heads/haacked"]
    expect(@git.time_ordered_refs).to eq(expected)
  end

  it 'should get only the tags for the selected branch' do
    expect(@git.tags_on_branch('refs/heads/test')).to eq(%W(test-r2 test-r1))
  end

  it 'should validate the git-ness of a directory' do
    expect(@git.valid_repo?).to eq(true)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blaggard-1.0.1 spec/git_spec.rb
blaggard-1.0.0 spec/git_spec.rb