Sha256: e873384b2b944a4edfab736395bad21ad7101e9510fdb2f970ae05be250d0d62
Contents?: true
Size: 834 Bytes
Versions: 1
Compression:
Stored size: 834 Bytes
Contents
require "spec_helper" require "action_view" describe ActionView::Base do describe "#number_to_duration" do it "should return 00:24 for 24 seconds" do subject.number_to_duration(24).should eql("00:24") end it "should return 00:00:24 for 24 seconds if :hours option is true" do subject.number_to_duration(24, :hours => true).should eql("00:00:24") end it "should return 01:00:54 for 3654 seconds" do subject.number_to_duration(3654, :hours => true).should eql("01:00:54") end it "should return 01:00:55 for 3654.5 seconds" do subject.number_to_duration(3654.5, :hours => true).should eql("01:00:55") end it "should return 60:54 for 3654 seconds if :hours option is false" do subject.number_to_duration(3654, :hours => false).should eql("60:54") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vidibus-helpers-0.0.2 | spec/vidibus/helpers/action_view_spec.rb |