test sprockets with custom js_dir
This commit is contained in:
parent
6a3a480d13
commit
da4ead8cf2
5 changed files with 15 additions and 0 deletions
|
@ -4,3 +4,8 @@ Feature: Sprockets
|
||||||
Given the Server is running at "test-app"
|
Given the Server is running at "test-app"
|
||||||
When I go to "/javascripts/sprockets_base.js"
|
When I go to "/javascripts/sprockets_base.js"
|
||||||
Then I should see "sprockets_sub_function"
|
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)
|
run JavascriptEnvironment.new(app)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# app.map "/#{app.css_dir}" do
|
# app.map "/#{app.css_dir}" do
|
||||||
# run StylesheetEnvironment.new(app)
|
# run StylesheetEnvironment.new(app)
|
||||||
# end
|
# end
|
||||||
|
|
Loading…
Reference in a new issue