<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/datasets/event_ranges.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -50,7 +50,17 @@ module PageEvent::PageExtensions
 				}], 
 				:order =&gt; &quot;event_datetime_start, event_datetime_end&quot;, :limit =&gt; limit)		
 		end
-		
+    
+    
+    
+    def events_in_range(start=nil, finish=nil)
+      []
+    end
+    
+    
+    
+    
+    
     def next_eventful_month(date=Time.now)
       last_day_of_month = Date.new(date.year, date.month, -1)
 </diff>
      <filename>lib/page_event/page_extensions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -63,3 +63,44 @@ describe Page do
 	end
 end
 
+
+describe Page do
+  dataset :event_ranges
+
+  describe &quot;#events_in_range&quot; do
+
+    it &quot;should find all events in a given year&quot; do
+      Page.events_in_range(&quot;2009&quot;).should include( pages(:march_first, :march_tenth, :april_first, :august_sixth, :next_christmas) )
+    end
+
+    it &quot;should find only events in a given year&quot; do
+      Page.events_in_range(&quot;2009&quot;).should_not include( pages(:last_christmas) )
+    end
+  
+    it &quot;should find all events in a given month&quot; do
+      Page.events_in_range(&quot;2009/03&quot;).should include( pages(:march_first, :march_tenth) )
+      Page.events_in_range(&quot;2009/04&quot;).should include( pages(:april_first) )
+      Page.events_in_range(&quot;2009/08&quot;).should include( pages(:august_sixth) )
+    end
+  
+    it &quot;should find only events of a given month&quot; do
+      Page.events_in_range(&quot;2009/03&quot;).should_not include( pages(:april_first, :august_sixth) )
+      Page.events_in_range(&quot;2009/04&quot;).should_not include( pages(:august_sixth) )
+      Page.events_in_range(&quot;2009/08&quot;).should_not include( pages(:april_first) )
+    end
+    
+    it &quot;should find events on a given day&quot; do
+      Page.events_in_range(&quot;2009/04/01&quot;).should == [pages(:april_first)]
+    end
+    
+    it &quot;should find only events on a given day&quot; do
+      Page.events_in_range(&quot;2009/04/01&quot;).should_not == [pages(:march_first)]
+    end
+    
+    it &quot;should find all events within a given range&quot; do
+      Page.events_in_range(&quot;2009/03/01&quot;,&quot;2009/03/10&quot;).should == [pages(:march_first, :march_tenth)]
+    end
+    
+  end
+  
+end
\ No newline at end of file</diff>
      <filename>spec/models/page_extensions_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>31808b94f78de42bfb2f98bd6683284d7d1a28dc</id>
    </parent>
  </parents>
  <author>
    <name>Andrew Neil</name>
    <email>andrew.jr.neil@gmail.com</email>
  </author>
  <url>http://github.com/mghaught/radiant-page-event/commit/e892e2924ac611d8e09a45e07a6d72c2580b3cd2</url>
  <id>e892e2924ac611d8e09a45e07a6d72c2580b3cd2</id>
  <committed-date>2009-06-07T13:43:02-07:00</committed-date>
  <authored-date>2009-06-07T13:43:02-07:00</authored-date>
  <message>Added specs for Page#find_in_range method.</message>
  <tree>d2026329fddfe10dd054dea8751207db1c23b0f7</tree>
  <committer>
    <name>Andrew Neil</name>
    <email>andrew.jr.neil@gmail.com</email>
  </committer>
</commit>
