Sha256: 7d456bcaf52b6604b50028be9769cf87588eae661decb97fcf402350bdc934c0

Contents?: true

Size: 852 Bytes

Versions: 10

Compression:

Stored size: 852 Bytes

Contents

require File.join(File.dirname(__FILE__), "spec_helper")

base = ::Middleman::Base
base.set :root, File.join(File.dirname(__FILE__), "fixtures", "sample")

describe "Auto Image sizes Feature" do
  it "should not append width and height if off" do
    base.disable :automatic_image_sizes
    browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
    browser.get("/auto-image-sizes.html")
    browser.last_response.body.should_not include("width=")
    browser.last_response.body.should_not include("height=")
  end
  
  it "should append width and height if off" do
    base.enable :automatic_image_sizes
    browser = Rack::Test::Session.new(Rack::MockSession.new(base.new))
    browser.get("/auto-image-sizes.html")
    browser.last_response.body.should include("width=")
    browser.last_response.body.should include("height=")
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
middleman-0.11.5 spec/auto_image_sizes.rb
middleman-0.11.4 spec/auto_image_sizes.rb
middleman-0.11.3 spec/auto_image_sizes.rb
middleman-0.11.2 spec/auto_image_sizes.rb
middleman-0.11.1 spec/auto_image_sizes.rb
middleman-0.11.0 spec/auto_image_sizes.rb
middleman-0.10.17 spec/auto_image_sizes.rb
middleman-0.10.16 spec/auto_image_sizes.rb
middleman-0.10.15 spec/auto_image_sizes.rb
middleman-0.10.14 spec/auto_image_sizes.rb