Created
October 23, 2016 04:24
-
-
Save ppeble/fc101a8c488ee87ecf43b9513ff900e6 to your computer and use it in GitHub Desktop.
Holiday definition - example test in ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the line of 'raw' ruby that I have in my YAML | |
assert_equal 'Labour Day', Holidays.on(Date.civil(2013,10,7), :au_qld)[0][:name] | |
# I want to turn it into this | |
- name: 'Labour Day' | |
year: 2013 | |
month: 10 | |
day: 7 | |
regions: ['au_qld'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment