Sha256: 215721dc3620a6fe7a8d561076f5d1ddbfc6e322e933544a7bdf344bc996bba0
Contents?: true
Size: 632 Bytes
Versions: 5
Compression:
Stored size: 632 Bytes
Contents
require 'spec_helper' require 'i18n' I18n.load_path << File.join(File.dirname(__FILE__), 'locales', 'duration_da.yml') describe Timespan::Span do subject { timespan } let(:from) { Chronic.parse("1 day ago") } let(:to) { Time.now } before do I18n.locale = :da end describe 'print in danish - multiple modes' do let(:timespan) { Timespan.new :from => from, :to => to } its(:to_s) { should == 'fra 03 May 2012 til 04 May 2012 der varer ialt 1 dag' } specify { subject.to_s(:dates).should == 'fra 03 May 2012 til 04 May 2012' } specify { subject.to_s(:duration).should == '1 dag' } end end
Version data entries
5 entries across 5 versions & 1 rubygems