Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add specs for :start_day option

  • Loading branch information...
commit e792f3f94c3b0a55ef633d5810632f544260d0ef 1 parent 62bc105
@johnnyshields johnnyshields authored
View
5 spec/integration/shared/by_calendar_month.rb
@@ -46,5 +46,10 @@
it 'should be able to use an alternative field' do
Event.by_calendar_month(:field => 'end_time').count.should eq 8
end
+
+ context ':start_day option' do
+ subject { Post.by_calendar_month(1, :start_day => :wednesday) }
+ its(:count){ should eq 7 }
+ end
end
end
View
7 spec/integration/shared/by_week.rb
@@ -5,7 +5,7 @@
describe '#by_week' do
context 'point-in-time' do
- subject { Post.by_week('2014-01-01') }
+ subject { Post.by_week('2014-01-02') }
its(:count){ should eq 4 }
end
@@ -45,5 +45,10 @@
it 'should be able to use an alternative field' do
Event.by_week(:field => 'end_time').count.should eq 5
end
+
+ context ':start_day option' do
+ subject { Post.by_week('2014-01-02', :start_day => :thursday) }
+ its(:count){ should eq 1 }
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.