Sha256: 87d7a74676218223a7120ef1c12c4016e80871381732a27c090e8ca7845f4a3c

Contents?: true

Size: 530 Bytes

Versions: 15

Compression:

Stored size: 530 Bytes

Contents

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

15 entries across 15 versions & 1 rubygems

Version Path
timezone-1.2.8 test/timezone/test_deprecate.rb
timezone-1.2.7 test/timezone/test_deprecate.rb
timezone-1.2.6 test/timezone/test_deprecate.rb
timezone-1.2.5 test/timezone/test_deprecate.rb
timezone-1.2.4 test/timezone/test_deprecate.rb
timezone-1.2.3 test/timezone/test_deprecate.rb
timezone-1.2.2 test/timezone/test_deprecate.rb
timezone-1.2.1 test/timezone/test_deprecate.rb
timezone-1.2.0 test/timezone/test_deprecate.rb
timezone-1.1.1 test/timezone/test_deprecate.rb
timezone-1.1.0 test/timezone/test_deprecate.rb
timezone-1.0.0 test/timezone/test_deprecate.rb
timezone-0.99.2 test/timezone/test_deprecate.rb
timezone-0.99.1 test/timezone/test_deprecate.rb
timezone-0.99.0 test/timezone/test_deprecate.rb