Sha256: e8e50070613510fdbd83c6dfd52379804e76a478e8a47660e00acfa88e8693fd

Contents?: true

Size: 1.47 KB

Versions: 3

Compression:

Stored size: 1.47 KB

Contents

Feature: Allow http_prefix to be prepended correctly to image-url when referencing a linked asset
  Background:
    Given a fixture app "base-app"
      And a file named "source/stylesheets/style.css.scss" with:
        """
        .foo {
          background: image-url("logo.png");
        }
        """

  Scenario: Assets built have the correct http_prefix prepended
    Given a file named "config.rb" with:
      """
      activate :sprockets
      config[:http_prefix] = '/foo/bar'
      """
    And a successfully built app

    When I cd to "build"
    Then the following files should exist:
      | stylesheets/style.css |
      | assets/logo.png |
    And the file "stylesheets/style.css" should contain:
      """
      .foo {
        background: url(/foo/bar/assets/logo.png); }
      """

  Scenario: When http_prefix is not set, just prepend /
    Given a file named "config.rb" with:
      """
      activate :sprockets
      """
    And a successfully built app

    When I cd to "build"
    Then the file "stylesheets/style.css" should contain:
      """
      .foo {
        background: url(/assets/logo.png); }
      """

  Scenario: relative_assets should still work
    Given a file named "config.rb" with:
      """
      activate :sprockets
      activate :relative_assets
      """
    And a successfully built app

    When I cd to "build"
    Then the file "stylesheets/style.css" should contain:
      """
      .foo {
        background: url(../assets/logo.png); }
      """

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-sprockets-4.1.1/features/test_cases/http_prefix_linked_assets.feature
middleman-sprockets-4.1.1 features/test_cases/http_prefix_linked_assets.feature
middleman-sprockets-4.1.0 features/test_cases/http_prefix_linked_assets.feature