Sha256: 14f612e314435ed0e366358c8f0f2027626027c71569cf9a3585866298fef8c9

Contents?: true

Size: 732 Bytes

Versions: 37

Compression:

Stored size: 732 Bytes

Contents

shared_examples_for "an embeddable" do
  
  # Requires same variables to be set as the shared resource spec.
  
  before(:all) do
    @record = @klass.gen
    @record.save.should be_true
  end
  
  describe "getting the oembed payload" do
    before(:all) do
      @oembed_payload = @record.oembed_payload(700, 700)
    end
    
    it "should be parsed from JSON" do
      @oembed_payload.should be_kind_of(Hash)
    end
    
    it "should have the embed source" do
      @oembed_payload["html"].should_not be_blank
    end
  end
  
  describe "getting the embed code" do
    before(:all) do
      @src = @record.embed_code(700, 700)
    end
    
    it "should be populated" do
      @src.should_not be_blank
    end
  end
  
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
vj-sdk-0.6.5 spec/shared/embeddable_spec.rb
vj-sdk-0.6.4 spec/shared/embeddable_spec.rb
vj-sdk-0.6.3 spec/shared/embeddable_spec.rb
vj-sdk-0.6.1 spec/shared/embeddable_spec.rb
vj-sdk-0.6.0 spec/shared/embeddable_spec.rb
vj-sdk-0.5.6 spec/shared/embeddable_spec.rb
vj-sdk-0.5.5 spec/shared/embeddable_spec.rb
vj-sdk-0.5.4 spec/shared/embeddable_spec.rb
vj-sdk-0.5.3 spec/shared/embeddable_spec.rb
vj-sdk-0.5.2 spec/shared/embeddable_spec.rb
vj-sdk-0.5.1 spec/shared/embeddable_spec.rb
vj-sdk-0.5.0 spec/shared/embeddable_spec.rb
vj-sdk-0.4.3 spec/shared/embeddable_spec.rb
vj-sdk-0.4.2 spec/shared/embeddable_spec.rb
vj-sdk-0.4.1 spec/shared/embeddable_spec.rb
vj-sdk-0.4.0 spec/shared/embeddable_spec.rb
vj-sdk-0.2.1 spec/shared/embeddable_spec.rb