middleman/features/step_definitions/page_layout_steps.rb

13 lines
700 B
Ruby
Raw Normal View History

2009-11-23 00:37:11 +01:00
Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
Middleman::Server.set :root, File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "spec", "fixtures", "sample")
Middleman::Server.page(url, :layout => layout.to_sym)
@browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman::Server.new))
2009-11-23 00:37:11 +01:00
end
Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
Middleman::Server.set :root, File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "spec", "fixtures", "sample")
Middleman::Server.with_layout(:layout => layout.to_sym) do
2009-11-23 00:37:11 +01:00
page(url)
end
@browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman::Server.new))
2009-11-23 00:37:11 +01:00
end