Sha256: a63787c6d19cfa51ae98d3db64124b24bdfe0e11416084142dab6dc20b8b8ad3

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

Feature: Alternate between multiple asset hosts

  Scenario: Set single host with inline-option
    Given a fixture app "asset-host-app"
    And a file named "config.rb" with:
      """
      activate :asset_host, host: "http://assets1.example.com"
      """
    And the Server is running
    When I go to "/asset_host.html"
    Then I should see 'src="https://code.jquery.com/jquery-2.1.3.min.js"'
    Then I should see content matching %r{http://assets1.example.com/}
    Then I should not see content matching %r{http://assets1.example.com//}
    When I go to "/stylesheets/asset_host.css"
    Then I should see content matching %r{http://assets1.example.com/}
    Then I should not see content matching %r{http://assets1.example.com//}

  Scenario: Set proc host with inline-option
    Given a fixture app "asset-host-app"
    And a file named "config.rb" with:
      """
      activate :asset_host, host: Proc.new { |asset|
        "http://assets%d.example.com" % (asset.hash % 4)
      }
      """
    And the Server is running
    When I go to "/asset_host.html"
    Then I should see 'src="https://code.jquery.com/jquery-2.1.3.min.js"'
    Then I should see content matching %r{http://assets1.example.com/}
    Then I should not see content matching %r{http://assets1.example.com//}
    When I go to "/stylesheets/asset_host.css"
    Then I should see content matching %r{http://assets1.example.com/}
    Then I should not see content matching %r{http://assets1.example.com//}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
middleman-core-4.0.0.rc.1 features/asset_host.feature
middleman-core-4.0.0.beta.2 features/asset_host.feature
middleman-core-4.0.0.beta.1 features/asset_host.feature