spec/sprockets-sass_spec.rb in sprockets-sass-0.2.0 vs spec/sprockets-sass_spec.rb in sprockets-sass-0.2.1

- old
+ new

@@ -116,9 +116,24 @@ dep.utime mtime, mtime asset.should be_stale end + it "adds dependencies from assets when imported" do + @assets.file "main.css.scss", %(@import "dep1";\nbody { color: $color; }) + @assets.file "dep1.css.scss", %(@import "dep2";\n) + dep = @assets.file "dep2.css.scss", "$color: blue;" + + asset = @env["main.css.scss"] + asset.should be_fresh + + mtime = Time.now + 1 + dep.open("w") { |f| f.write "$color: red;" } + dep.utime mtime, mtime + + asset.should be_stale + end + it "adds dependencies when imported from a glob" do @assets.file "main.css.scss", %(@import "folder/*";\nbody { color: $color; background: $bg-color; }) @assets.file "folder/dep1.css.scss", "$color: blue;" dep = @assets.file "folder/dep2.css.scss", "$bg-color: red;"