Sha256: df93f316598e2f86d0bc05e4ea70047aa3a64e65425d6071696d4053c81d8c18

Contents?: true

Size: 622 Bytes

Versions: 8

Compression:

Stored size: 622 Bytes

Contents

require_relative "../../test_helper"

module MinitestReportersTest
  class JUnitReporterUnitTest < Minitest::Test
    def setup
      @reporter = Minitest::Reporters::JUnitReporter.new(
          "report",
          false,
          :base_apath => Dir.pwd
      )
      @result = Minitest::Result.new("test_name")
    end

    def test_relative_path
      path = Pathname.new(__FILE__).relative_path_from(Pathname.new(Dir.pwd)).to_s
      @result.source_location = [path, 10]
      relative_path = @reporter.get_relative_path(@result)
      assert_equal path, relative_path.to_s
    end
  end
end


Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
minitest-reporters-1.3.6 test/unit/minitest/junit_reporter_test.rb
nullifyable-0.1.0 vendor/bundle/gems/minitest-reporters-1.3.5/test/unit/minitest/junit_reporter_test.rb
minitest-reporters-1.3.5 test/unit/minitest/junit_reporter_test.rb
minitest-reporters-1.3.5.beta1 test/unit/minitest/junit_reporter_test.rb
minitest-reporters-1.3.4 test/unit/minitest/junit_reporter_test.rb
minitest-reporters-1.3.3 test/unit/minitest/junit_reporter_test.rb
minitest-reporters-1.3.2 test/unit/minitest/junit_reporter_test.rb
minitest-reporters-1.3.2.beta2 test/unit/minitest/junit_reporter_test.rb