spec/sprockets-sass_spec.rb in sprockets-sass-0.4.0 vs spec/sprockets-sass_spec.rb in sprockets-sass-0.4.1
- old
+ new
@@ -45,9 +45,17 @@
@assets.file "dep.sass", "$color: blue\nhtml\n height: 100%"
asset = @env["main.css"]
asset.to_s.should == "html {\n height: 100%; }\n\nbody {\n color: blue; }\n"
end
+ it "imports files with the correct content type" do
+ @assets.file "main.css.scss", %(@import "dep";\nbody { color: $color; })
+ @assets.file "dep.js", "var app = {};"
+ @assets.file "_dep.css.scss", "$color: blue;"
+ asset = @env["main.css"]
+ asset.to_s.should == "body {\n color: blue; }\n"
+ end
+
it "imports files with directives" do
@assets.file "main.css.scss", %(@import "dep";)
@assets.file "dep.css", "/*\n *= require subdep\n */"
@assets.file "subdep.css.scss", "$color: blue;\nbody { color: $color; }"
asset = @env["main.css"]