Sha256: 40503c6312e4368b53324e39d78b6edc629df722842950b88c1e924c6e88eedb

Contents?: true

Size: 433 Bytes

Versions: 7

Compression:

Stored size: 433 Bytes

Contents

require File.join(File.dirname(__FILE__), 'helper')

class ChunkTest < MiniTest::Unit::TestCase

  def setup
    @diff = new_diff(fixture('first.diff'))
    @chunk = @diff.chunks.last 
  end

  def test_lines
    assert_equal 20, @chunk.lines.size
    @chunk.lines.each do |l|
      assert l.kind_of?(PrettyDiff::Line)
    end
  end

  def test_line_numbers
    assert @chunk.line_numbers.kind_of?(PrettyDiff::LineNumbers)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pretty_diff-2.1.4 test/chunk_test.rb
pretty_diff-2.1.3 test/chunk_test.rb
pretty_diff-2.1.2 test/chunk_test.rb
pretty_diff-2.1.1 test/chunk_test.rb
pretty_diff-2.1.0 test/chunk_test.rb
pretty_diff-2.0.1 test/chunk_test.rb
pretty_diff-2.0.0 test/chunk_test.rb