Merge pull request #1151 from jpiasetz/refactors-steps
Combined layout and theme features into one
This commit is contained in:
commit
a75b4a865d
|
@ -31,14 +31,13 @@ Given /^I have an? "(.*)" file that contains "(.*)"$/ do |file, text|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I have a (.*) layout that contains "(.*)"$/ do |layout, text|
|
Given /^I have an? (.*) (layout|theme) that contains "(.*)"$/ do |name, type, text|
|
||||||
File.open(File.join('_layouts', layout + '.html'), 'w') do |f|
|
folder = if type == 'layout'
|
||||||
f.write(text)
|
'_layouts'
|
||||||
|
else
|
||||||
|
'_theme'
|
||||||
end
|
end
|
||||||
end
|
File.open(File.join(folder, name + '.html'), 'w') do |f|
|
||||||
|
|
||||||
Given /^I have a (.*) theme that contains "(.*)"$/ do |layout, text|
|
|
||||||
File.open(File.join('_theme', layout + '.html'), 'w') do |f|
|
|
||||||
f.write(text)
|
f.write(text)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue