Sha256: b35e36637f9705f6be9482ab78a9308c97855ce0fb2412a25c68ad2be9baeb27

Contents?: true

Size: 693 Bytes

Versions: 1

Compression:

Stored size: 693 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class LineTest < Minitest::Test
  def setup
    @line_number = GitDiff::LineNumber.new(0, 0)
  end

  def test_from_string_with_addition
    addition = GitDiff::Line.from_string("+ addition")

    refute_nil addition
    assert_instance_of GitDiff::Line::Addition, addition
  end

  def test_from_string_with_deletion
    deletion = GitDiff::Line.from_string("- deletion")

    refute_nil deletion
    assert_instance_of GitDiff::Line::Deletion, deletion
  end

  def test_from_string_with_context
    context = GitDiff::Line.from_string(" context")

    refute_nil context
    assert_instance_of GitDiff::Line::Context, context
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_diff-0.4.3 test/line_test.rb