mirror of
https://github.com/plashchynski/crono.git
synced 2026-11-13 12:13:34 +01:00
Rails 5 supports "week" in time notations
This commit is contained in:
1 parent
51c914ea8a
commit
b39be015b1
1 file changed
+6
-1
+6
-1
@@ -4,7 +4,12 @@ describe Crono::Period do
|
||||
describe '#description' do
|
||||
it 'should return period description' do
|
||||
@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
|
||||
|
||||
|
||||
Reference in new issue
Block a user