test/unit_test.rb in sinatra-assetpack-0.1.5 vs test/unit_test.rb in sinatra-assetpack-0.1.6

- old
+ new

@@ -75,11 +75,11 @@ assert body =~ /<script src='\/js\/hello.[0-9]+.js'><\/script>/ assert body =~ /<script src='\/js\/hi.[0-9]+.js'><\/script>/ end test "helpers in production (compressed html thingie)" do - app.expects(:production?).returns(true) + app.expects(:environment).returns(:production) get '/index.html' assert body =~ /<script src='\/js\/app.[0-9]+.js'><\/script>/ end test "file with multiple dots in name" do @@ -128,10 +128,10 @@ get '/js/app.js' assert_equal "public, max-age=#{86400*30}", last_response.headers['Cache-Control'] assert_equal (Time.now + (86400*30)).httpdate, last_response.headers['Expires'] end - test 'custom expiration of single assets' do + test 'custom expiration of packed assets' do app.settings.assets.expires 86400*365, :public get '/js/app.js' assert_equal "public, max-age=#{86400*365}", last_response.headers['Cache-Control'] assert_equal (Time.now + (86400*365)).httpdate, last_response.headers['Expires']