Sha256: a9129ff483f383ff15efed2ae84fae5520d2475302b324fadd0d83445bca3c21
Contents?: true
Size: 880 Bytes
Versions: 1
Compression:
Stored size: 880 Bytes
Contents
require "spec_helper" describe Uploadcare::Rails::Group do before(:each) do @post = PostWithCollection.new title: "Post title", file: "8e1f6ccb-0c4a-471e-934e-ac6ba030d33c~2" @group = @post.file end it "should be Uploadcare::Rails::File" do @group.should be_kind_of(Uploadcare::Rails::Group) end it "should be not loaded by default" do @group.loaded?.should == false end it "should load itself" do @group.load @group.loaded?.should == true end it "file should respond to :uuid and :to_s methods" do @group.to_s.should == @group.uuid end it "group should have files" do @group.load @group.files.should be_kind_of(Array) @group.files.sample.should be_kind_of(Uploadcare::Rails::File) end it "loaded group files should be loaded too" do @group.load @group.files.sample.loaded?.should == true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
uploadcare-rails-1.0.0.rc4 | spec/models/group.rb |