Sha256: 1a28ab23c557d15cb50ba706832b330e6420205901748b41ec100a3e726dbe34

Contents?: true

Size: 635 Bytes

Versions: 5

Compression:

Stored size: 635 Bytes

Contents

require 'spec_helper'
require 'druid/elements'

describe Druid::Elements::Image do
  describe "interface" do
    let(:element) { 'element' }
    let(:image) { Druid::Elements::Image.new(element) }

    it "should know the image width" do
      expect(element).to receive(:width).and_return(100)
      expect(image.width).to eql 100
    end

    it "should know the image height" do
      expect(element).to receive(:height).and_return(120)
      expect(image.height).to eql 120
    end

    it "should register with tag_name :img" do
      expect(Druid::Elements.element_class_for(:img)).to be Druid::Elements::Image
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
druid-s-1.0.0 spec/druid/elements/image_spec.rb
druid-ts-1.2.6 spec/druid/elements/image_spec.rb
druid-ts-1.2.5 spec/druid/elements/image_spec.rb
druid-ts-1.2.4 spec/druid/elements/image_spec.rb
druid-ts-1.2.3 spec/druid/elements/image_spec.rb