Sha256: 4fe9dbb5a16494874af8fa16d0488b4e0f8f4b1119bf3ccf473aa8d10b0d7fbd

Contents?: true

Size: 561 Bytes

Versions: 33

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

require 'timezone/deprecate'
require 'minitest/autorun'

class TestDeprecate < ::Minitest::Test
  # This test should not be parallelized because it tests the result
  # of a single class-level attribute.
  def test_callback
    values = []

    Timezone::Deprecate.callback = lambda do |klass, method, message|
      values = [klass, method, message]
    end

    Timezone::Deprecate.call(self, :test_message, 'foo')

    assert_equal [self, :test_message, 'foo'], values
  ensure
    Timezone::Deprecate.callback = nil
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
timezone-1.3.28 test/timezone/test_deprecate.rb
timezone-1.3.27 test/timezone/test_deprecate.rb
timezone-1.3.26 test/timezone/test_deprecate.rb
timezone-1.3.25 test/timezone/test_deprecate.rb
timezone-1.3.24 test/timezone/test_deprecate.rb
timezone-1.3.23 test/timezone/test_deprecate.rb
timezone-1.3.22 test/timezone/test_deprecate.rb
timezone-1.3.21 test/timezone/test_deprecate.rb
timezone-1.3.20 test/timezone/test_deprecate.rb
timezone-1.3.19 test/timezone/test_deprecate.rb
timezone-1.3.18 test/timezone/test_deprecate.rb
timezone-1.3.17 test/timezone/test_deprecate.rb
timezone-1.3.16 test/timezone/test_deprecate.rb
timezone-1.3.15 test/timezone/test_deprecate.rb
timezone-1.3.14 test/timezone/test_deprecate.rb
timezone-1.3.13 test/timezone/test_deprecate.rb
timezone-1.3.12 test/timezone/test_deprecate.rb
timezone-1.3.11 test/timezone/test_deprecate.rb
timezone-1.3.10 test/timezone/test_deprecate.rb
timezone-1.3.9 test/timezone/test_deprecate.rb