File: tc_ruby_core_support.rb

package info (click to toggle)
ruby-tzinfo 2.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,824 kB
  • sloc: ruby: 21,667; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 453 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# encoding: UTF-8
# frozen_string_literal: true

require_relative 'test_utils'

class TCRubyCoreSupport < Minitest::Test
  def test_untaint_returns_object
    o = Object.new
    assert_same(o, TZInfo.const_get(:RubyCoreSupport).untaint(o))
  end

  def test_untaint_untaints_object
    skip_if_taint_is_undefined_or_no_op
    o = Object.new.taint
    assert(o.tainted?)
    TZInfo.const_get(:RubyCoreSupport).untaint(o)
    refute(o.tainted?)
  end
end