flowerbox-delivery/features/process_with_sprockets.feature

36 lines
1.0 KiB
Gherkin
Raw Normal View History

2012-01-23 16:58:20 +00:00
Feature: Process files with Sprockets
2012-01-23 17:21:11 +00:00
Background:
2012-01-23 16:58:20 +00:00
Given I have the file "dir/file.js" with the content:
"""
//= require other
a file
"""
And I have the file "dir/other.js" with the content:
"""
another file
"""
2012-01-23 17:21:11 +00:00
Scenario: Simple Sprockets work
When I instantiate a Sprockets handler with the following asset directories:
| dir |
And I work with the Sprockets asset "file"
Then the handler should have the following files in order:
| dir/other.js |
| dir/file.js |
Scenario: Require the file twice
Given I have the file "dir/third.js" with the content:
"""
//= require other
third file
"""
2012-01-23 16:58:20 +00:00
When I instantiate a Sprockets handler with the following asset directories:
| dir |
And I work with the Sprockets asset "file"
2012-01-23 17:21:11 +00:00
And I work with the Sprockets asset "third"
2012-01-23 16:58:20 +00:00
Then the handler should have the following files in order:
| dir/other.js |
| dir/file.js |
2012-01-23 17:21:11 +00:00
| dir/third.js |
2012-01-23 16:58:20 +00:00