Closed pjpollina closed 5 years ago
Thank you very much, looks good. Would you add a basic spec for each added method, checking that it works correctly?
Sure thing!
Do you have any example instances of the Day and Celebration classes? I'm having a bit of trouble figuring out the proper implementation of their instance variables.
Any call to Calendar#[]
or PerpetualCalendar#[]
returns a Day
instance populated with one or more Celebration
. If you want something festive quickly, without bothering about loading sanctorale data, you can take one of the fixed-date celebrations of the temporale cycle, e.g. Dec 25th or Jan 1st:
$ irb -I lib -r calendarium-romanum
> day = CalendariumRomanum::PerpetualCalendar.new[Date.new(2000, 1, 1)]
Now you can explore the Day
instance in irb as needed.
Thanks! I'll start working right away.
There seems to be a discrepancy between the language of certain constants on my machine and Travis CI, the test is working locally but the build fails when I push it. Do you know of any way I can fix that?
Yes. When you execute rspec
or rake spec
, specs are executed only with the default locale (set to English in spec/spec_helper.rb
). Travis runs specs for all supported locales in order to make sure that no functionality is locale-dependent in an unexpected way and that there are all required localization strings for all locales. You can do the same with rake spec_all_locales
.
Currently the standard way of handling a locale-specific expectation like this is wrapping it in a block passed to I18n.with_locale
- there are numerous examples of this in the test suite.
Think I got everything this time.
I think that did the trick! I really appreciate all the help and patience you've given me, I've never used many of these tools before so this was a good learning experience to say the least.
You are welcome. RSpec is really widely used in the Ruby community and the i18n gem is Rails' standard way of making applications translatable, so I hope the stuff learned here will be of some further use for you.
Merging.
As per Issue #30