public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
make tests less sensitive when in the month you run them

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@3009 
567b1171-46fb-0310-a4c9-b4bef9110e78
psq (author)
Mon Oct 29 01:25:17 -0700 2007
commit  b374c429b79c7a934e54280cb032b3556b71bcc5
tree    b43bdba35ce3ad0d6ed44f002dbeb78cf4375f47
parent  7dcb02a9a741b8876b5efbd1cbfd44c4915bbd02
...
36
37
38
39
 
 
40
41
42
...
36
37
38
 
39
40
41
42
43
0
@@ -36,7 +36,8 @@ class SectionDropTest < Test::Unit::TestCase
0
   end
0
   
0
   def test_should_get_month_array
0
- months = sections(:home).articles.collect { |a| a.published? ? a.published_at.beginning_of_month.to_date.to_s(:db) : nil }.compact.uniq.sort.reverse
0
+ this_month = Time.now.utc.beginning_of_month.to_date
0
+ months = sections(:home).articles.collect { |a| (a.published? && ( a.published_at.beginning_of_month.to_date <= this_month)) ? a.published_at.beginning_of_month.to_date.to_s(:db) : nil }.compact.uniq.sort.reverse
0
     assert_equal months, sections(:home).to_liquid['months'].collect { |d| d.to_s(:db) }
0
   end
0
 end

Comments

    No one has commented yet.