Sha256: 721f445c80984b3fae5ffc4508c46b2773adc60103ad7056de70361da6322448

Contents?: true

Size: 804 Bytes

Versions: 1

Compression:

Stored size: 804 Bytes

Contents

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

describe IterationList, "when listing sensei iterations in a git repo containing appropriate 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 iteration-1`
      `touch test.txt`
      `git add test.txt`
      `git commit -m "Added test file"`
      `git tag not-an-iteration`
      `touch test2.txt`
      `git add test2.txt`
      `git commit -m "Added test2 file"`
      `git tag iteration-2`
    end
  end
  
  after do
    `rm -rf /tmp/foo`
  end
  
  it "should count the number of iterations, ignoring tags that are not iterations" do
    IterationList.new("/tmp/foo").iterations.should == 2
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

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