2009-11-23 00:37:11 +01:00
|
|
|
Feature: Automatically detect and insert image dimensions into tags
|
|
|
|
In order to speed up development and appease YSlow
|
|
|
|
|
|
|
|
Scenario: Rendering an image with the feature disabled
|
2016-01-14 23:14:50 +01:00
|
|
|
Given a fixture app "automatic-image-size-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
"""
|
2011-12-30 04:04:39 +01:00
|
|
|
And the Server is running at "automatic-image-size-app"
|
2009-11-23 00:37:11 +01:00
|
|
|
When I go to "/auto-image-sizes.html"
|
|
|
|
Then I should not see "width="
|
2010-09-05 05:26:48 +02:00
|
|
|
And I should not see "height="
|
2016-01-14 23:14:50 +01:00
|
|
|
When I go to "/markdown-sizes.html"
|
|
|
|
Then I should not see "width="
|
|
|
|
And I should not see "height="
|
|
|
|
|
2010-09-05 05:26:48 +02:00
|
|
|
Scenario: Rendering an image with the feature enabled
|
2016-01-14 23:14:50 +01:00
|
|
|
Given a fixture app "automatic-image-size-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
activate :automatic_image_sizes
|
|
|
|
"""
|
2011-12-30 04:04:39 +01:00
|
|
|
And the Server is running at "automatic-image-size-app"
|
2010-09-05 05:26:48 +02:00
|
|
|
When I go to "/auto-image-sizes.html"
|
2016-01-14 23:14:50 +01:00
|
|
|
Then I should see 'width="1"'
|
|
|
|
And I should see 'height="1"'
|
|
|
|
When I go to "/markdown-sizes.html"
|
|
|
|
Then I should see 'width="1"'
|
|
|
|
And I should see 'height="1"'
|