Sha256: 0c3dcb44a05cb9249cf0873d1fd4fc3c33220bf5be3ccaa206b1a78d4a314778
Contents?: true
Size: 1.07 KB
Versions: 16
Compression:
Stored size: 1.07 KB
Contents
require File.expand_path('../../test_helper.rb', __FILE__) class TestChart < Test::Unit::TestCase def setup @chart = Rockstar::Chart.new('1108296002', '1108900802') end test 'should require from' do assert_raise(ArgumentError) { Rockstar::Chart.new('', '1108900802') } end test 'should require to' do assert_raise(ArgumentError) { Rockstar::Chart.new('1108296002', '') } end test 'should be able to parse to and from that are unix timestamp strings' do chart = Rockstar::Chart.new('1108296002', '1108900802') assert_equal(1108296002, chart.from) assert_equal(1108900802, chart.to) end test 'should be able to parse to and from that are unix timestamp fixnums' do chart = Rockstar::Chart.new(1108296002, 1108900802) assert_equal(1108296002, chart.from) assert_equal(1108900802, chart.to) end test 'should be able to parse to and from that are times' do chart = Rockstar::Chart.new(Time.at(1108296002), Time.at(1108900802)) assert_equal(1108296002, chart.from) assert_equal(1108900802, chart.to) end end
Version data entries
16 entries across 16 versions & 3 rubygems