Sha256: e3b26eddae23cacd70b95eb5bf775846cfa85f3552bbbedc66f122cfa6b73f25

Contents?: true

Size: 801 Bytes

Versions: 21

Compression:

Stored size: 801 Bytes

Contents

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

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

21 entries across 21 versions & 1 rubygems

Version Path
tzinfo-0.3.20 test/tc_info_timezone.rb
tzinfo-0.3.19 test/tc_info_timezone.rb
tzinfo-0.3.18 test/tc_info_timezone.rb
tzinfo-0.3.17 test/tc_info_timezone.rb
tzinfo-0.3.16 test/tc_info_timezone.rb
tzinfo-0.3.15 test/tc_info_timezone.rb
tzinfo-0.3.14 test/tc_info_timezone.rb
tzinfo-0.3.10 test/tc_info_timezone.rb
tzinfo-0.3.1 test/tc_info_timezone.rb
tzinfo-0.3.0 test/tc_info_timezone.rb
tzinfo-0.3.11 test/tc_info_timezone.rb
tzinfo-0.3.12 test/tc_info_timezone.rb
tzinfo-0.3.13 test/tc_info_timezone.rb
tzinfo-0.3.2 test/tc_info_timezone.rb
tzinfo-0.3.3 test/tc_info_timezone.rb
tzinfo-0.3.4 test/tc_info_timezone.rb
tzinfo-0.3.5 test/tc_info_timezone.rb
tzinfo-0.3.6 test/tc_info_timezone.rb
tzinfo-0.3.7 test/tc_info_timezone.rb
tzinfo-0.3.8 test/tc_info_timezone.rb