-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test to see if nil imported_asset_path works.
- Loading branch information
Brad Chen
committed
Aug 26, 2016
1 parent
0927d98
commit 386004e
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
Feature: Imported assets are built with the correct extensions without any asset path prefix | ||
|
||
Background: | ||
Given a fixture app "base-app" | ||
And a file named "config.rb" with: | ||
""" | ||
activate :sprockets do |config| | ||
config.imported_asset_path = nil | ||
end | ||
sprockets.append_path File.join(root, 'vendor') | ||
""" | ||
And a file named "vendor/fonts/webfont-vendor.svg" with: | ||
""" | ||
""" | ||
And a file named "vendor/fonts/webfont-vendor.svg.gz" with: | ||
""" | ||
""" | ||
And a file named "vendor/fonts/webfont-vendor.ttf.gz" with: | ||
""" | ||
""" | ||
And a file named "source/fonts/webfont-source.svg" with: | ||
""" | ||
""" | ||
And a file named "source/fonts/webfont-source.svg.gz" with: | ||
""" | ||
""" | ||
And a file named "source/fonts/webfont-source.ttf.gz" with: | ||
""" | ||
""" | ||
And a file named "vendor/images/drawing-vendor.svg" with: | ||
""" | ||
""" | ||
And a file named "source/images/drawing-source.svg" with: | ||
""" | ||
""" | ||
And a file named "vendor/images/extensions-source.svg.gz" with: | ||
""" | ||
""" | ||
And a file named "vendor/images/extensions-source.min.js" with: | ||
""" | ||
""" | ||
And a file named "vendor/images/extensions-source.asdf.asdf.min.js.asdf" with: | ||
""" | ||
""" | ||
|
||
|
||
Scenario: Assets built by being linked are built with the right extension | ||
Given a file named "source/stylesheets/manifest.css" with: | ||
""" | ||
//= link 'fonts/webfont-vendor.svg' | ||
//= link 'fonts/webfont-vendor.svg.gz' | ||
//= link 'fonts/webfont-vendor.ttf.gz' | ||
//= link 'images/drawing-vendor.svg' | ||
//= link 'images/extensions-source.svg.gz' | ||
//= link 'images/extensions-source.min.js' | ||
//= link 'images/extensions-source.asdf.asdf.min.js.asdf' | ||
""" | ||
And a successfully built app | ||
|
||
When I cd to "build" | ||
Then the following files should exist: | ||
| fonts/webfont-vendor.svg | | ||
| fonts/webfont-vendor.svg.gz | | ||
| fonts/webfont-vendor.ttf.gz | | ||
| images/drawing-vendor.svg | | ||
| images/extensions-source.svg.gz | | ||
| images/extensions-source.min.js | | ||
| images/extensions-source.asdf.asdf.min.js.asdf | | ||
|
||
Scenario: Assets in source don't have their extensions mangled | ||
Given a successfully built app | ||
|
||
When I cd to "build" | ||
Then the following files should exist: | ||
| fonts/webfont-source.svg | | ||
| fonts/webfont-source.svg.gz | | ||
| fonts/webfont-source.ttf.gz | | ||
| images/drawing-source.svg | | ||
|