Sha256: bf9eac0a2bba898b9e4ec46ae9de9a19b66a03cac96ab9d4490d052b92980e56

Contents?: true

Size: 483 Bytes

Versions: 7

Compression:

Stored size: 483 Bytes

Contents

require 'minitest_helper'

module SlideHero
  describe Image do
    it "takes an image path and renders appropriate markup" do
      image = Image.new("cornify.gif", "Unicorn", width: 280, height: 326)
      image.compile.must_equal %{<img width="280" height="326" src="images/cornify.gif" alt="Unicorn">}
    end

    it "doesn't require all fields" do
      image = Image.new("cornify.gif")
      image.compile.must_equal %{<img src="images/cornify.gif" alt="">}
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
slide_hero-0.0.9 test/slide_hero/image_spec.rb
slide_hero-0.0.8 test/slide_hero/image_spec.rb
slide_hero-0.0.7 test/slide_hero/image_spec.rb
slide_hero-0.0.6 test/slide_hero/image_spec.rb
slide_hero-0.0.5 test/slide_hero/image_spec.rb
slide_hero-0.0.4 test/slide_hero/image_spec.rb
slide_hero-0.0.3 test/slide_hero/image_spec.rb