File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ def test_package_caching
9191 end
9292
9393 def test_precache_all
94+ Jammit . load_configuration ( 'test/config/assets.yml' ) . reload!
9495 Jammit . packager . precache_all ( 'test/precache' , 'http://www.example.com' )
9596 assert PRECACHED_FILES == glob ( 'test/precache/*' )
9697 assert Zlib ::GzipReader . open ( 'test/precache/css_test-datauri.css.gz' ) { |f | f . read } == File . read ( 'test/fixtures/jammed/css_test-datauri.css' )
@@ -130,4 +131,12 @@ def test_package_helper
130131 FileUtils . rm_rf ( "test/public/assets" )
131132 end
132133
134+ def test_packaging_javascripts_with_package_names
135+ FileUtils . rm_rf ( "test/public/assets/*" )
136+ Jammit . package! :config_file => "test/config/assets.yml" , :package_names => [ :js_test ]
137+ assert File . exists? ( "test/public/assets/js_test.js" )
138+ assert File . read ( 'test/public/assets/js_test.js' ) == File . read ( 'test/fixtures/jammed/js_test_package_names.js' )
139+ FileUtils . rm_rf ( "test/public/assets" )
140+ end
141+
133142end
You can’t perform that action at this time.
0 commit comments