spec/sprockets-sass_spec.rb in sprockets-sass-1.0.3 vs spec/sprockets-sass_spec.rb in sprockets-sass-1.1.0
- old
+ new
@@ -229,10 +229,14 @@
@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/ }
+ if Sass.version[:minor] > 2
+ sass_cache = cache.detect.detect { |key, value| value['pathname'] =~ /main\.css\.scss/ }
+ else
+ sass_cache = cache.keys.detect { |key| key =~ /main\.css\.scss/ }
+ end
expect(sass_cache).to_not be_nil
end
it 'adds the #asset_path helper' do
@assets.file 'asset_path.css.scss', %(body { background: url(asset-path("image.jpg")); })