middleman/features/step_definitions/page_layout_steps.rb

15 lines
389 B
Ruby
Raw Normal View History

2009-11-23 00:37:11 +01:00
Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
@initialize_commands ||= []
@initialize_commands << lambda {
page(url, :layout => layout.to_sym)
}
2009-11-23 00:37:11 +01:00
end
Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
@initialize_commands ||= []
@initialize_commands << lambda {
with_layout(layout.to_sym) do
page(url)
end
}
2009-11-23 00:37:11 +01:00
end