add test for simple sinatra/rack app mounting

This commit is contained in:
Thomas Reynolds 2011-11-30 10:17:23 -08:00
parent dd0836b9d5
commit 073a8dee74
4 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,8 @@
Feature: Support Rack apps mounted using map
Scenario: Mounted Rack App at /sinatra
Given the Server is running at "sinatra-app"
When I go to "/"
Then I should see "Hello World (Middleman)"
When I go to "/sinatra/"
Then I should see "Hello World (Sinatra)"

View file

@ -0,0 +1,11 @@
require "sinatra"
class MySinatra < Sinatra::Base
get "/" do
"Hello World (Sinatra)"
end
end
map "/sinatra" do
run MySinatra
end

View file

@ -0,0 +1,5 @@
---
layout: false
---
Hello World (Middleman)

View file

@ -43,6 +43,7 @@ Gem::Specification.new do |s|
# Development and test
s.add_development_dependency("slim")
s.add_development_dependency("rdiscount")
s.add_development_dependency("sinatra")
s.add_development_dependency("coffee-filter", ["~> 0.1.1"])
s.add_development_dependency("liquid", ["~> 2.2.0"])
s.add_development_dependency("cucumber", ["~> 1.1.0"])