diff --git a/features/mount_rack.feature b/features/mount_rack.feature new file mode 100644 index 00000000..8e88b164 --- /dev/null +++ b/features/mount_rack.feature @@ -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)" \ No newline at end of file diff --git a/fixtures/sinatra-app/config.rb b/fixtures/sinatra-app/config.rb new file mode 100644 index 00000000..1642da57 --- /dev/null +++ b/fixtures/sinatra-app/config.rb @@ -0,0 +1,11 @@ +require "sinatra" + +class MySinatra < Sinatra::Base + get "/" do + "Hello World (Sinatra)" + end +end + +map "/sinatra" do + run MySinatra +end \ No newline at end of file diff --git a/fixtures/sinatra-app/source/index.html.erb b/fixtures/sinatra-app/source/index.html.erb new file mode 100644 index 00000000..8b59c41c --- /dev/null +++ b/fixtures/sinatra-app/source/index.html.erb @@ -0,0 +1,5 @@ +--- +layout: false +--- + +Hello World (Middleman) \ No newline at end of file diff --git a/middleman.gemspec b/middleman.gemspec index 11393305..c74ed50f 100644 --- a/middleman.gemspec +++ b/middleman.gemspec @@ -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"])