search for: grouped_by_month

Displaying 1 result from an estimated 1 matches for "grouped_by_month".

2008 Apr 22
0
rspec model class methods
I''ve started specifying a project and could use some help. I''m not sure if the spec is entirely necessary, it would be great to get some guidance on a best practice or something close. I recently realized the need to add the method below grouped_by_months and started to write a spec. idea 1: {{{ before do @comment = Comment.new @comment.stub!(:created_at).and_return(Time.now -2.days) end it ''should return comments grouped by month'' do group_terms = lambda{|comment| comment.created_at.beginning_of_month }...