Skip to content

Commit

Permalink
Added pagination & find all since
Browse files Browse the repository at this point in the history
  • Loading branch information
kmayer committed Nov 6, 2010
1 parent e29d366 commit 57ed823
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/highrise/recording.rb
@@ -1,3 +1,9 @@
module Highrise
class Recording < Base; end
class Recording < Base
include Pagination

def self.find_all_across_pages_since(time)
find_all_across_pages(:params => { :since => time.utc.strftime("%Y%m%d%H%M%S") })
end
end
end
8 changes: 8 additions & 0 deletions spec/highrise/recording_spec.rb
Expand Up @@ -2,4 +2,12 @@

describe Highrise::Recording do
it { should be_a_kind_of Highrise::Base }

it_should_behave_like "a paginated class"

it ".find_all_across_pages_since" do
time = Time.parse("Wed Jan 14 15:43:11 -0200 2009")
Highrise::Recording.should_receive(:find_all_across_pages).with({:params=>{:since=>"20090114174311"}}).and_return("result")
Highrise::Recording.find_all_across_pages_since(time).should == "result"
end
end

0 comments on commit 57ed823

Please sign in to comment.