1
+ # frozen_string_literal: false
2
+
1
3
require "sprockets_test"
2
4
3
5
module AssetTests
@@ -117,7 +119,7 @@ def self.test(name, &block)
117
119
118
120
sandbox filename do
119
121
write ( filename , "a;" )
120
- asset = asset ( 'test.js' )
122
+ assert asset ( 'test.js' )
121
123
122
124
File . unlink ( filename )
123
125
@@ -132,7 +134,7 @@ def self.test(name, &block)
132
134
sandbox main , dep do
133
135
write ( main , "//= depend_on test-dep\n " )
134
136
write ( dep , "a;" )
135
- asset = asset ( 'test-main.js' )
137
+ assert asset ( 'test-main.js' )
136
138
137
139
File . unlink ( dep )
138
140
@@ -215,7 +217,7 @@ def setup
215
217
end
216
218
217
219
test "charset is nil" do
218
- assert_equal nil , @asset . charset
220
+ assert_nil @asset . charset
219
221
end
220
222
221
223
test "length" do
@@ -1312,7 +1314,7 @@ def setup
1312
1314
end
1313
1315
1314
1316
test "content type" do
1315
- assert_equal nil , content_type ( "empty" )
1317
+ assert_nil content_type ( "empty" )
1316
1318
1317
1319
assert_equal "application/javascript" , content_type ( "application.js" )
1318
1320
assert_equal "text/css" , content_type ( "application.css" )
@@ -1324,7 +1326,7 @@ def setup
1324
1326
1325
1327
assert_equal "text/css" , content_type ( "store.css.erb" )
1326
1328
assert_equal "text/plain" , content_type ( "files.erb" )
1327
- assert_equal nil , content_type ( "store.foo" )
1329
+ assert_nil content_type ( "store.foo" )
1328
1330
1329
1331
assert_equal "application/javascript" , content_type ( "application.coffee" )
1330
1332
assert_equal "text/css" , content_type ( "application.scss" )
@@ -1347,7 +1349,7 @@ def setup
1347
1349
assert_equal "application/javascript" , content_type ( "jquery.ext/form.js" )
1348
1350
assert_equal "application/javascript" , content_type ( "jquery-coffee.min.coffee" )
1349
1351
assert_equal "application/javascript" , content_type ( "jquery-custom.min.js.erb" )
1350
- assert_equal nil , content_type ( "jquery.js.min" )
1352
+ assert_nil content_type ( "jquery.js.min" )
1351
1353
1352
1354
assert_equal "application/javascript" , content_type ( "all.coffee/plain.js" )
1353
1355
assert_equal "application/javascript" , content_type ( "all.coffee/hot.coffee" )
@@ -1357,7 +1359,7 @@ def setup
1357
1359
assert_equal "application/javascript" , content_type ( "bar-ng.ngt.haml" )
1358
1360
assert_equal "application/javascript" , content_type ( "baz-ng.js.ngt" )
1359
1361
1360
- assert_equal nil , content_type ( "sprite.css.embed" )
1362
+ assert_nil content_type ( "sprite.css.embed" )
1361
1363
1362
1364
assert_equal "application/javascript" , content_type ( "traceur.es6" )
1363
1365
assert_equal "application/javascript" , content_type ( "traceur.js.es6" )
0 commit comments