Skip to content

Commit 4c06a59

Browse files
committed
Only test that clean task on sprockets 2
sprockets 3 also take in consideration the age of the asset before cleaning. By default it is one hour so we can't simulate it on the tests anymore
1 parent 7bad463 commit 4c06a59

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_task.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def test_clean
106106
assert File.exist?("#{@dir}/#{digest_path}")
107107
end
108108

109+
if Sprockets::VERSION < "3"
109110
def test_clean_with_keep_specified
110111
assert !@environment_ran
111112
path = @assets['foo.js'].pathname
@@ -139,4 +140,5 @@ def test_clean_with_keep_specified
139140
ensure
140141
FileUtils.rm(new_path) if new_path
141142
end
143+
end
142144
end

0 commit comments

Comments
 (0)