Sha256: 39050a21d6691ab41b50a19243acf2e72e1c5486c4528ed3c9cb05836c68a086

Contents?: true

Size: 1.74 KB

Versions: 48

Compression:

Stored size: 1.74 KB

Contents

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)"

  Scenario: Built Mounted Rack App at /sinatra
    Given a successfully built app at "sinatra-app"
    When I cd to "build"
    Then the following files should exist:
      | index.html |
    Then the following files should not exist:
      | sinatra/index.html |
      | sinatra/index2.html |

  Scenario: Static Ruby Endpoints
    Given a fixture app "sinatra-app"
    And a file named "config.rb" with:
    """
    endpoint "hello.html" do
      "world"
    end
    """
    And the Server is running at "sinatra-app"
    When I go to "/hello.html"
    Then I should see "world"

  Scenario: Built Mounted Rack App at /sinatra (including rack endpoints)
    Given a fixture app "sinatra-app"
    And a file named "config.rb" with:
      """
      require "sinatra"

      class MySinatra < Sinatra::Base
        get "/" do
          "Hello World (Sinatra)"
        end
        get "/derp.html" do
          "De doo"
        end
      end

      map "/sinatra" do
        run MySinatra
      end

      endpoint "sinatra/index2.html", path: "/sinatra/"

      endpoint "dedoo.html", path: "/sinatra/derp.html"

      endpoint "hello.html" do
        "world"
      end
      """
    And a successfully built app at "sinatra-app"
    When I cd to "build"
    Then the following files should exist:
      | index.html |
      | sinatra/index2.html |
      | dedoo.html |
    And the file "sinatra/index2.html" should contain 'Hello World (Sinatra)'
    And the file "dedoo.html" should contain 'De doo'

Version data entries

48 entries across 48 versions & 3 rubygems

Version Path
middleman-core-4.5.1 features/mount_rack.feature
middleman-core-4.5.0 features/mount_rack.feature
middleman-core-4.4.3 features/mount_rack.feature
middleman-core-4.4.2 features/mount_rack.feature
middleman-core-4.4.0 features/mount_rack.feature
middleman-core-4.3.11 features/mount_rack.feature
middleman-core-4.3.10 features/mount_rack.feature
middleman-core-4.3.8 features/mount_rack.feature
middleman-core-4.3.7 features/mount_rack.feature
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-core-4.3.3/features/mount_rack.feature
middleman-core-4.3.6 features/mount_rack.feature
middleman-core-4.3.5 features/mount_rack.feature
middleman-core-4.3.4 features/mount_rack.feature
middleman-core-4.3.3 features/mount_rack.feature
middleman-core-4.3.2 features/mount_rack.feature
middleman-core-4.3.1 features/mount_rack.feature
middleman-core-4.3.0 features/mount_rack.feature
middleman-core-with-external-sources-watch-fix-4.1.10 features/mount_rack.feature
middleman-core-with-external-sources-watch-fix-4.1.0 features/mount_rack.feature
middleman-core-4.2.1 features/mount_rack.feature