2009-11-23 00:37:11 +01:00
|
|
|
Given /^page "([^\"]*)" has layout "([^\"]*)"$/ do |url, layout|
|
2011-07-13 09:38:04 +02:00
|
|
|
sandbox_server = Middleman.server do
|
|
|
|
set :root, File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "fixtures", "test-app")
|
|
|
|
page(url, :layout => layout.to_sym)
|
|
|
|
end
|
|
|
|
@browser = Rack::Test::Session.new(Rack::MockSession.new(sandbox_server.new))
|
2009-11-23 00:37:11 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
Given /^"([^\"]*)" with_layout block has layout "([^\"]*)"$/ do |url, layout|
|
2011-07-13 09:38:04 +02:00
|
|
|
sandbox_server = Middleman.server do
|
|
|
|
set :root, File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "fixtures", "test-app")
|
|
|
|
with_layout(layout.to_sym) do
|
|
|
|
page(url)
|
|
|
|
end
|
2009-11-23 00:37:11 +01:00
|
|
|
end
|
2011-07-13 09:38:04 +02:00
|
|
|
@browser = Rack::Test::Session.new(Rack::MockSession.new(sandbox_server.new))
|
2009-11-23 00:37:11 +01:00
|
|
|
end
|