Sha256: e3e0e814fff7264132191f844a149cb2d1f799051bc6ad64fe8a826c4f5c285f

Contents?: true

Size: 681 Bytes

Versions: 10

Compression:

Stored size: 681 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")

describe Animoto::Assets::Base do
  
  describe "initialization" do
    before do
      @source = 'http://website.com/asset'
      @asset = Animoto::Assets::Base.new @source
    end
    
    it "should set the source from the given source url" do
      @asset.source.should == @source
    end
  end
  
  describe "#to_hash" do
    before do
      @asset = Animoto::Assets::Base.new 'http://website.com/asset'
    end
    
    it "should have a 'source_url' key with the url" do
      @asset.to_hash.should have_key('source_url')
      @asset.to_hash['source_url'].should == @asset.source
    end
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
animoto-1.5.6 ./spec/animoto/assets/base_spec.rb
animoto-1.5.5 ./spec/animoto/assets/base_spec.rb
animoto-1.5.4 ./spec/animoto/assets/base_spec.rb
animoto-1.5.3 ./spec/animoto/assets/base_spec.rb
animoto-1.5.2 ./spec/animoto/assets/base_spec.rb
animoto-1.5.1 ./spec/animoto/assets/base_spec.rb
animoto-1.5.0 ./spec/animoto/assets/base_spec.rb
animoto-1.3.1 ./spec/animoto/assets/base_spec.rb
animoto-1.3.0 ./spec/animoto/assets/base_spec.rb
animoto-1.2.0 ./spec/animoto/assets/base_spec.rb