Skip to content

Instantly share code, notes, and snippets.

@ppeble
Created October 23, 2016 04:24
Show Gist options
  • Save ppeble/fc101a8c488ee87ecf43b9513ff900e6 to your computer and use it in GitHub Desktop.
Save ppeble/fc101a8c488ee87ecf43b9513ff900e6 to your computer and use it in GitHub Desktop.
Holiday definition - example test in ruby
# 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