Sha256: 9438d4f60087c51c298273926eb6106c13011f276509541cba3e3813f23c9422

Contents?: true

Size: 711 Bytes

Versions: 23

Compression:

Stored size: 711 Bytes

Contents

require 'spec_helper'

module Writefully
  describe Asset do 
    let(:index) { {site: 'codemy-net', resource: 'posts', slug: '1-hash-selector-pattern' } }
    subject(:asset) { Asset.new(index) }
    let(:url)   { "https://codemycasts.s3.amazonaws.com/codemy-net/posts/1-hash-selector-pattern/assets/" }

    let(:content_details) { Content.new(index).details }

    its(:names) { should include 'hash-selector-cover.png' }
    its(:endpoint) { should eq 'codemy-net/posts/1-hash-selector-pattern/assets'}

    it "#url" do 
      subject.url(Writefully::Storage.endpoint).should eq url
    end

    it "#convert_for" do 
      subject.convert_for(content_details)["cover"].should include url
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
writefully-0.7.1 spec/lib/writefully/asset_spec.rb
writefully-0.6.12 spec/lib/writefully/asset_spec.rb
writefully-0.6.11 spec/lib/writefully/asset_spec.rb
writefully-0.6.10 spec/lib/writefully/asset_spec.rb
writefully-0.6.9 spec/lib/writefully/asset_spec.rb
writefully-0.6.7 spec/lib/writefully/asset_spec.rb
writefully-0.6.6 spec/lib/writefully/asset_spec.rb
writefully-0.6.5 spec/lib/writefully/asset_spec.rb
writefully-0.6.4 spec/lib/writefully/asset_spec.rb
writefully-0.6.3 spec/lib/writefully/asset_spec.rb
writefully-0.6.2 spec/lib/writefully/asset_spec.rb
writefully-0.5.1 spec/lib/writefully/asset_spec.rb
writefully-0.5.0 spec/lib/writefully/asset_spec.rb
writefully-0.4.10 spec/lib/writefully/asset_spec.rb
writefully-0.4.8 spec/lib/writefully/asset_spec.rb
writefully-0.4.7 spec/lib/writefully/asset_spec.rb
writefully-0.4.6 spec/lib/writefully/asset_spec.rb
writefully-0.4.5 spec/lib/writefully/asset_spec.rb
writefully-0.4.4 spec/lib/writefully/asset_spec.rb
writefully-0.4.2 spec/lib/writefully/asset_spec.rb