Sha256: bd1db5b411836ef7b775e4dec88818855b9e521ecc2cd74b18d13ffae1fbd4fa

Contents?: true

Size: 656 Bytes

Versions: 6

Compression:

Stored size: 656 Bytes

Contents

require File.join(File.dirname(__FILE__), "helpers", "spec_helper")

describe Videojuicer::Resource::Collection do

  before(:all) do
    @objects = [:foo]*100
    @collection = Videojuicer::Resource::Collection.new(@objects[0..9], 155, 17, 10)
  end
  
  it "is instantiated correctly" do    
    @collection.should be_kind_of(Videojuicer::Resource::Collection)
    @collection.total.should == 155
    @collection.offset.should == 17
    @collection.limit.should == 10
  end
  
  it "can count the number of pages" do
    @collection.page_count.should == 16
  end
  
  it "can tell the current page" do
    @collection.page_number.should == 2
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
videojuicer-vj-sdk-0.1.0 spec/collection_spec.rb
videojuicer-vj-sdk-0.1.1 spec/collection_spec.rb
videojuicer-vj-sdk-0.1.12 spec/collection_spec.rb
videojuicer-vj-sdk-0.1.3 spec/collection_spec.rb
videojuicer-vj-sdk-0.1.4 spec/collection_spec.rb
videojuicer-vj-sdk-0.1.5 spec/collection_spec.rb