mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
test sprockets with custom js_dir
This commit is contained in:
parent
6a3a480d13
commit
da4ead8cf2
5 changed files with 15 additions and 0 deletions
|
@ -3,4 +3,9 @@ Feature: Sprockets
|
|||
Scenario: Sprockets require
|
||||
Given the Server is running at "test-app"
|
||||
When I go to "/javascripts/sprockets_base.js"
|
||||
Then I should see "sprockets_sub_function"
|
||||
|
||||
Scenario: Sprockets require with custom :js_dir
|
||||
Given the Server is running at "sprockets-app"
|
||||
When I go to "/library/javascripts/sprockets_base.js"
|
||||
Then I should see "sprockets_sub_function"
|
1
fixtures/sprockets-app/config.rb
Normal file
1
fixtures/sprockets-app/config.rb
Normal file
|
@ -0,0 +1 @@
|
|||
set :js_dir, "library/javascripts"
|
|
@ -0,0 +1,5 @@
|
|||
//= require "sprockets_sub"
|
||||
|
||||
function base() {
|
||||
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
function sprockets_sub_function() {
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@ module Middleman::CoreExtensions::Sprockets
|
|||
run JavascriptEnvironment.new(app)
|
||||
end
|
||||
end
|
||||
|
||||
# app.map "/#{app.css_dir}" do
|
||||
# run StylesheetEnvironment.new(app)
|
||||
# end
|
||||
|
|
Loading…
Reference in a new issue