spec/integration/shared/by_month.rb in by_star-2.2.0.rc1 vs spec/integration/shared/by_month.rb in by_star-2.2.0

- old
+ new

@@ -9,11 +9,11 @@ its(:count){ should eq 2 } end context 'timespan' do subject { Event.by_month(1) } - its(:count){ should eq 8 } + its(:count){ should eq 9 } end context 'timespan strict' do subject { Event.by_month(Date.parse('2014-02-01'), strict: true) } its(:count){ should eq 1 } @@ -21,20 +21,20 @@ context 'with :year option' do context 'point-in-time' do subject { Post.by_month(12, year: 2013) } - its(:count){ should eq 1 } + its(:count){ should eq 8 } end context 'timespan' do subject { Event.by_month('December', year: 2013) } - its(:count){ should eq 4 } + its(:count){ should eq 12 } end context 'timespan strict' do subject { Event.by_month('Dec', year: 2013, strict: true) } - its(:count){ should eq 0 } + its(:count){ should eq 4 } end end it 'should raise an error when given an invalid argument' do ->{ Post.by_month(0) }.should raise_error(ByStar::ParseError, 'Month must be a number between 1 and 12 or a month name')