Sha256: 119e883775d78154752f6c20b60c9ea3d510b2d36ae9ada8575115b2c8c366a8
Contents?: true
Size: 1.04 KB
Versions: 8
Compression:
Stored size: 1.04 KB
Contents
require File.join(File.dirname(__FILE__), "helpers", "spec_helper") describe Videojuicer::Asset do before :all do configure_test_settings @klass = Videojuicer::Asset @assets = @klass.types.map do |t| 4.of { t.gen } << t.gen(:friendly_name => "to_filter") end.flatten end after :all do @assets.each { |a| a.destroy } end describe "listing assets of all types" do it "should list all assets" do @assets = @klass.all @assets.class.should == Videojuicer::Resource::Collection @assets.total.should >= @assets.size end it "should limit results" do @assets = @klass.all(:limit => 5) @assets.length.should == 5 end it "should paginate" do @assets = @klass.all(:limit => 10, :page => 2) @assets.page_count.should > 2 @assets.page_number.should == 2 @assets.length.should == 10 end it "should filter by friendly_name" do @klass.all("friendly_name.like" => "to_filter").total.should == @klass.types.size end end end
Version data entries
8 entries across 8 versions & 1 rubygems