public
Fork of mojombo/grit
Description: Grit is a Ruby library for extracting information from a git repository in an object oriented manner.
Homepage: http://grit.rubyforge.org/
Clone URL: git://github.com/dustin/grit.git
Search Repo:
grit / test / test_diff.rb
100644 19 lines (14 sloc) 0.416 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require File.dirname(__FILE__) + '/helper'
 
class TestDiff < Test::Unit::TestCase
  def setup
    @r = Repo.new(GRIT_REPO)
  end
  
  # list_from_string
  
  def test_list_from_string_new_mode
    output = fixture('diff_new_mode')
    
    diffs = Diff.list_from_string(@r, output)
    assert_equal 2, diffs.size
    assert_equal 10, diffs.first.diff.split("\n").size
    assert_equal nil, diffs.last.diff
  end
end