spec/number_additions_spec.rb in bootstripe-0.2.12 vs spec/number_additions_spec.rb in bootstripe-0.2.13
- old
+ new
@@ -12,12 +12,18 @@
0.to_formatted_time.should eq '00:00'
(60.75).to_formatted_time.should eq '01:01'
(673.2).to_formatted_time.should eq '11:13'
end
- it 'should periods accurately' do
+ it 'should describe periods accurately' do
3600.to_period.should eq '1h'
7260.to_period.should eq '2h 1m'
(86400 + 10).to_period.should eq '1d 10s'
+ end
+
+ it 'should describe periods non-abbreviated' do
+ 3600.to_period(true, false).should eq '1 hour'
+ 7260.to_period(true, false).should eq '2 hours, 1 minute'
+ (86400 + 10).to_period(true, false).should eq '1 day, 10 seconds'
end
end
\ No newline at end of file