Sha256: 9a23ab4034142c80ffd7d8c974fb87900eb00d3b0b9303a6a2ebd2921a82ef27

Contents?: true

Size: 756 Bytes

Versions: 260

Compression:

Stored size: 756 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'test/unit'
require 'tzinfo'

include TZInfo

class TCInfoTimezone < Test::Unit::TestCase
  
  class TestInfoTimezone < InfoTimezone
    attr_reader :setup_info
    
    protected
      def setup(info)
        super(info)
        @setup_info = info
      end     
  end
  
  def test_identifier
    tz = InfoTimezone.new(TimezoneInfo.new('Test/Identifier'))
    assert_equal('Test/Identifier', tz.identifier)
  end
  
  def test_info
    i = TimezoneInfo.new('Test/Identifier')
    tz = InfoTimezone.new(i)
    assert_same(i, tz.send(:info))
  end
  
  def test_setup
    i = TimezoneInfo.new('Test/Identifier')
    tz = TestInfoTimezone.new(i)
    assert_same(i, tz.setup_info)
  end
end

Version data entries

260 entries across 183 versions & 18 rubygems

Version Path
tzinfo-0.3.62 test/tc_info_timezone.rb
tzinfo-0.3.61 test/tc_info_timezone.rb
tzinfo-0.3.60 test/tc_info_timezone.rb
tzinfo-0.3.59 test/tc_info_timezone.rb
tzinfo-0.3.58 test/tc_info_timezone.rb
tzinfo-0.3.57 test/tc_info_timezone.rb
tzinfo-0.3.56 test/tc_info_timezone.rb
tzinfo-0.3.55 test/tc_info_timezone.rb
tzinfo-0.3.54 test/tc_info_timezone.rb
tzinfo-0.3.53 test/tc_info_timezone.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/tzinfo-0.3.52/test/tc_info_timezone.rb
tzinfo-0.3.52 test/tc_info_timezone.rb
tzinfo-0.3.51 test/tc_info_timezone.rb
tzinfo-0.3.50 test/tc_info_timezone.rb
tzinfo-0.3.49 test/tc_info_timezone.rb
tzinfo-0.3.48 test/tc_info_timezone.rb
tzinfo-0.3.47 test/tc_info_timezone.rb
tzinfo-0.3.46 test/tc_info_timezone.rb
tzinfo-0.3.45 test/tc_info_timezone.rb
classiccms-0.7.5 vendor/bundle/gems/tzinfo-0.3.32/test/tc_info_timezone.rb