…w rather than .today("tomorrow"), pass in Time.now rather than Date.today into the other two specs.
This reverts commit 81d1360.
…ovided method names.
* thomas: Again prove to thomas he is wrong. Prove to Thomas that he's wrong. Add by_current_work_week and cheat a little when working out the end of a weekend. Add by_current_weekend, for giving objects between 3pm Friday and 3pm Monday. If currently weekend will return current weekend.
… the first day of the year is.
…of a weekend.
… Monday. If currently weekend will return current weekend.
…e neccessary, and fixing specs broken by named_scope fixture addition.
1) Fortnight and Week numbering now starts at 0, not 1. 2) by_year can now take a string 3) by_year now passes the block it takes to by_star 4) by_year can take nil as the first argument and will default to the current year 5) using is_a? rather than ==, just a bit of OCD on my behalf 6) by_month now passes the block it takes to by_star 7) Use Time.zone.now.year rather than Time.now.year, as we love timezones 8) by_fortnight now passes the block it takes to by_star 9) by_week now passes the block it takes to by_star 10) work_out_year now returns the current year when passed nil 11) No longer use TOTAL_POSTS, Post.count wil suffice 12) added size helper method, shortcut for find.size 13) Wrote a lot of specs to cover edge cases 14) Wrote some more specs to cover block taking (ensures blocks are parsed) 15) Wrote some more specs to cover alternative fields (ensures options are passed) 16) Added Event table for testing alternative fields.
…cumentation & more specs.