Fix file contents test

This commit is contained in:
Joseph Wynn 2016-09-25 20:58:13 +01:00
parent 707b1078c5
commit 606870273e
2 changed files with 5 additions and 4 deletions

View File

@ -57,13 +57,13 @@ Feature: Jekyll responsive_image tag
"""
template: _includes/responsive-image.html
sizes:
- width: 50
- width: 100
- width: 200
- width: 300
- width: 150
"""
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png template: _includes/custom-template.html %}"
When I run Jekyll
Then I should see "[100, 200, 300]" in "_site/index.html"
Then I should see "[50, 100, 150]" in "_site/index.html"
Scenario: Overriding the generated filenames
Given I have a responsive_image configuration with:

View File

@ -39,7 +39,8 @@ Given /^I have a file "(.+)" with "(.+)"$/ do |path, contents|
end
Then /^I should see "(.+)" in "(.*)"$/ do |text, file|
assert_match(Regexp.new(text), File.open(file).readlines.join)
contents = File.open(file).readlines.join
assert contents.inspect.include?(text), "Expected to find #{text.inspect} in #{contents.inspect}"
end
Then /^the file "(.+)" should exist$/ do |path|