Sha256: 69c4a93341b69a89f395665e9bf69a7007ca86de9a63eee08424e2dd628906fb

Contents?: true

Size: 515 Bytes

Versions: 2

Compression:

Stored size: 515 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" class="stretch" src="images/cornify.gif" alt="Unicorn">}
    end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slide_hero-0.0.11 test/slide_hero/image_spec.rb
slide_hero-0.0.10 test/slide_hero/image_spec.rb