Sha256: eb34eb9a765b9d71de226a41129794ac6f5fa9a69d3a7716ca0cab26c96c5132

Contents?: true

Size: 669 Bytes

Versions: 5

Compression:

Stored size: 669 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'integration/shared'

describe GitStats::GitData::Repo do
  include_context "shared"

  it 'should gather all files in repo' do
    repo.files.map(&:filename).should =~ %w(long_second.haml  long.txt  second.txt  test2.rb  test.rb  test.txt)
  end

  it 'should retrieve correct file content for old file' do
    repo.commits.first! { |c| c.sha == 'c87ecf9' }.files.first! { |f| f.filename == 'test.txt' }.content.should == "bb



test
"
  end

  it 'should retrieve correct file content for the newest file' do
    file = repo.files.first! { |f| f.filename == 'test.txt' }
    file.content.should == "bb

testtest

test
"
  end


end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
git_stats-1.0.16 spec/integration/file_spec.rb
git_stats-1.0.15 spec/integration/file_spec.rb
git_stats-1.0.14 spec/integration/file_spec.rb
git_stats-1.0.13 spec/integration/file_spec.rb
git_stats-1.0.12 spec/integration/file_spec.rb