2009-11-22 18:37:11 -05:00
|
|
|
Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
|
2010-09-06 13:59:51 -04:00
|
|
|
Middleman::Server.set :root, File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "fixtures", "test-app")
|
2010-09-05 22:28:38 -04:00
|
|
|
Middleman::Server.page(url, :layout => layout.to_sym)
|
|
|
|
@browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman::Server.new))
|
2009-11-22 18:37:11 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
|
2010-09-06 13:59:51 -04:00
|
|
|
Middleman::Server.set :root, File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "fixtures", "test-app")
|
2010-09-05 22:28:38 -04:00
|
|
|
Middleman::Server.with_layout(:layout => layout.to_sym) do
|
2009-11-22 18:37:11 -05:00
|
|
|
page(url)
|
|
|
|
end
|
2010-09-05 22:28:38 -04:00
|
|
|
@browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman::Server.new))
|
2009-11-22 18:37:11 -05:00
|
|
|
end
|