summaryrefslogtreecommitdiff
path: root/t/test-custodian-util-timespan.rb
AgeCommit message (Collapse)Author
2016-04-22Updated to fix the last remaining rubocop warnings.Steve Kemp
This involved silencing a few issues that were judged to be minor, and changing various whitespaces and function-calls. The most obvious example was changing this: assert(ret.kind_of? Array) To this: assert(ret.kind_of?(Array))
2015-03-09More minor space fixupsSteve Kemp
2015-03-09Whitespace fixups.Steve Kemp
These were all identified and suggested by rubocop.
2015-03-09Removed spaces inside parenthesis.Steve Kemp
2015-03-09Prefer single-quotes when you don't need interpolation.Steve Kemp
So "foo" is less good than 'foo'.
2015-03-09Do not use parentheses for method calls with no arguments.Steve Kemp
This is neater. Flagged by rubocop
2015-03-09Omit the parentheses in defs when the method doesn't accept any arguments.Steve Kemp
This is neater.
2015-03-09Don't use "::" for method-calls.Steve Kemp
Instead prefer ".". Flagged by rubocop
2015-01-13Don't marry our code to ruby1.8Steve Kemp
2013-06-24Updated the code to be more module.Steve Kemp
Broke down the inside? function into a function for returning the hours in a period, and for sanitizing hour strings "14" vs. "2pm", etc. Updated test-cases to match.
2013-06-24The worst-case for testing a time-period, and one used in theSteve Kemp
parser test, is matching against a period that covers the full 24 hours. Correctly terminate this case, and add a new test-case to ensure that this is always correct.
2013-06-24Updated the tests to ensure the "current hour" is valid.Steve Kemp
This means testing values outside the range of 0-23 (inclusive). We did this already for the start & end times. This updates #4451.
2013-06-24 Added Custodian::Util::TimeSpanSteve Kemp
This class is used to determine whether an "hour" is within a given hour-span. e.g. To cope with: foo must run ping except between 04-06 otherwise 'alert'. This updates issue #4551.