Sha256: fd65e7447ada50555bd803697292055b195c14c691f0c0a4bc6a78fcf1d3c160

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

require "test_helper"

class LineNumberRangeTest < MiniTest::Unit::TestCase

  def test_from_string_with_empty_string
    range = GitDiff::LineNumberRange.from_string("")

    assert_equal 0, range.start
    assert_equal 0, range.number_of_lines
  end

  def test_from_string_with_empty_string
    range = GitDiff::LineNumberRange.from_string("180,7")

    assert_equal 180, range.start
    assert_equal 7, range.number_of_lines
  end

  def test_to_s
    range = GitDiff::LineNumberRange.from_string("180,7")

    assert_equal "+180,7", range.to_s(:+)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_diff-0.3.0 test/line_number_range_test.rb