Fix file contents test
This commit is contained in:
parent
707b1078c5
commit
606870273e
|
@ -57,13 +57,13 @@ Feature: Jekyll responsive_image tag
|
||||||
"""
|
"""
|
||||||
template: _includes/responsive-image.html
|
template: _includes/responsive-image.html
|
||||||
sizes:
|
sizes:
|
||||||
|
- width: 50
|
||||||
- width: 100
|
- width: 100
|
||||||
- width: 200
|
- width: 150
|
||||||
- width: 300
|
|
||||||
"""
|
"""
|
||||||
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png template: _includes/custom-template.html %}"
|
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
|
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
|
Scenario: Overriding the generated filenames
|
||||||
Given I have a responsive_image configuration with:
|
Given I have a responsive_image configuration with:
|
||||||
|
|
|
@ -39,7 +39,8 @@ Given /^I have a file "(.+)" with "(.+)"$/ do |path, contents|
|
||||||
end
|
end
|
||||||
|
|
||||||
Then /^I should see "(.+)" in "(.*)"$/ do |text, file|
|
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
|
end
|
||||||
|
|
||||||
Then /^the file "(.+)" should exist$/ do |path|
|
Then /^the file "(.+)" should exist$/ do |path|
|
||||||
|
|
Loading…
Reference in New Issue