spec/sprockets-sass_spec.rb in sprockets-sass-0.6.1 vs spec/sprockets-sass_spec.rb in sprockets-sass-0.7.0

- old
+ new

@@ -179,9 +179,20 @@ dep.utime mtime, mtime asset.should_not be_fresh(@env) end + it "uses the environment's cache" do + cache = {} + @env.cache = cache + + @assets.file "main.css.scss", %($color: blue;\nbody { color: $color; }) + + @env['main.css'].to_s + sass_cache = cache.keys.detect { |key| key =~ /main\.css\.scss/ } + sass_cache.should_not be_nil + end + it "adds the #asset_path helper" do @assets.file "asset_path.css.scss", %(body { background: url(asset-path("image.jpg")); }) @assets.file "asset_url.css.scss", %(body { background: asset-url("image.jpg"); }) @assets.file "asset_path_options.css.scss", %(body { background: url(asset-path("image.jpg", $digest: true, $prefix: "/themes")); }) @assets.file "asset_url_options.css.scss", %(body { background: asset-url("image.jpg", $digest: true, $prefix: "/themes"); })