Sha256: 7b66142c83e4a8c7ac149ff12193a65be69a10cae68c7c4a4a801c53b4202ea9

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require File.dirname(__FILE__) + "/../spec_helper"

describe GitTagLister, "when listing tags in a git repo containing tags" do
  
  before do
    Dir.mkdir '/tmp/foo'
    Dir.chdir '/tmp/foo' do
      `git init`
      `touch first.txt`
      `git add .`
      `git commit -am "Initial commit"`
      `git tag tag-1`
      `touch test.txt`
      `git add test.txt`
      `git commit -m "Added test file"`
      `git tag otherOne`
    end
    @current_dir = Dir.pwd
    @tags = GitTagLister.new("/tmp/foo").tags
  end
  
  after do
    `rm -rf /tmp/foo`
  end
  
  it "should list the available tags" do
    @tags.should == ["otherOne", "tag-1"]
  end
  
  it "should put the pwd back when it's done" do
    Dir.pwd.should == @current_dir
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sensei-0.0.1 spec/sensei/git_tag_lister_spec.rb