mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-23 04:20:24 +08:00
18 lines
451 B
Ruby
18 lines
451 B
Ruby
# require File.expand_path('../../../spec_helper', __FILE__)
|
|
# require File.expand_path('../fixtures/methods', __FILE__)
|
|
# require File.expand_path('../shared/to_i', __FILE__)
|
|
|
|
# describe "Time#tv_sec" do
|
|
# it_behaves_like(:time_to_i, :tv_sec)
|
|
# end
|
|
|
|
describe "Time#tv_sec" do
|
|
before do
|
|
@method = :tv_sec
|
|
end
|
|
|
|
it "returns the value of time as an integer number of seconds since epoch" do
|
|
Time.at(0).send(@method).should == 0
|
|
end
|
|
end
|