File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 22require 'rake/sprocketstask'
33require 'sprockets'
44require 'action_view'
5- require 'action_view/base'
65
76module Sprockets
87 module Rails
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ def setup
3737 @app . config . time_zone = 'UTC'
3838 @app . config . middleware ||= Rails ::Configuration ::MiddlewareStackProxy . new
3939 @app . config . active_support . deprecation = :notify
40- ActionView ::Base # load ActionView
4140
4241 Dir . chdir ( app . root ) do
4342 dir = "app/assets/config"
@@ -330,12 +329,12 @@ def test_load_tasks
330329 def test_task_precompile
331330 app . configure do
332331 config . assets . paths << FIXTURES_PATH
333- config . assets . precompile += [ "foo.js" ]
332+ config . assets . precompile += [ "foo.js" , "url.css" ]
334333 end
335334 app . initialize!
336335 app . load_tasks
337336
338- path = "#{ app . assets_manifest . dir } /foo-4ef5541f349f7ed5a0d6b71f2fa4c82745ca106ae02f212aea5129726ac6f6ab .js"
337+ path = "#{ app . assets_manifest . dir } /foo-#{ Rails . application . assets [ 'foo.js' ] . etag } .js"
339338
340339 silence_stderr do
341340 Rake . application [ 'assets:clobber' ] . execute
@@ -346,6 +345,8 @@ def test_task_precompile
346345 Rake . application [ 'assets:precompile' ] . execute
347346 end
348347 assert File . exist? ( path )
348+ url_css_path = File . join ( app . assets_manifest . dir , Rails . application . assets [ 'url.css' ] . digest_path )
349+ assert_match ( %r{/assets/logo-#{ Rails . application . assets [ 'logo.png' ] . etag } .png} , File . read ( url_css_path ) )
349350
350351 silence_stderr do
351352 Rake . application [ 'assets:clobber' ] . execute
You can’t perform that action at this time.
0 commit comments