add test for simple sinatra/rack app mounting
This commit is contained in:
parent
dd0836b9d5
commit
073a8dee74
8
features/mount_rack.feature
Normal file
8
features/mount_rack.feature
Normal 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)"
|
11
fixtures/sinatra-app/config.rb
Normal file
11
fixtures/sinatra-app/config.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
require "sinatra"
|
||||
|
||||
class MySinatra < Sinatra::Base
|
||||
get "/" do
|
||||
"Hello World (Sinatra)"
|
||||
end
|
||||
end
|
||||
|
||||
map "/sinatra" do
|
||||
run MySinatra
|
||||
end
|
5
fixtures/sinatra-app/source/index.html.erb
Normal file
5
fixtures/sinatra-app/source/index.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
layout: false
|
||||
---
|
||||
|
||||
Hello World (Middleman)
|
|
@ -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"])
|
||||
|
|
Loading…
Reference in a new issue