mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-24 17:58:39 +02:00
Rails 5 supports "week" in time notations
This commit is contained in:
@@ -4,7 +4,12 @@ describe Crono::Period do
|
|||||||
describe '#description' do
|
describe '#description' do
|
||||||
it 'should return period description' do
|
it 'should return period description' do
|
||||||
@period = Crono::Period.new(1.week, on: :monday, at: '15:20')
|
@period = Crono::Period.new(1.week, on: :monday, at: '15:20')
|
||||||
expect(@period.description).to be_eql('every 7 days at 15:20 on Monday')
|
expected_description = if ActiveSupport::VERSION::MAJOR >= 5
|
||||||
|
'every 1 week at 15:20 on Monday'
|
||||||
|
else
|
||||||
|
'every 7 days at 15:20 on Monday'
|
||||||
|
end
|
||||||
|
expect(@period.description).to be_eql(expected_description)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user