File: tc_ruby_core_support.rb

package info (click to toggle)
libtzinfo-ruby 0.3.19-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,992 kB
  • ctags: 2,904
  • sloc: ruby: 47,071; makefile: 5
file content (15 lines) | stat: -rwxr-xr-x 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'test/unit'
require 'tzinfo/ruby_core_support'

include TZInfo

class TCRubyCoreSupport < Test::Unit::TestCase
  def test_rational_new!
    assert_equal(Rational(3,4), RubyCoreSupport.rational_new!(3,4))
  end
  
  def test_datetime_new!
    assert_equal(DateTime.new(2008,10,6,20,30,0, 1, Date::ITALY), RubyCoreSupport.datetime_new!(Rational(117827777, 48),1,2299161))
  end
end