Sha256: 708503ac251a2df920bdccb32b7b2f853d91f3f29a47375a8647e08e3c604cf1
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
require File.dirname(__FILE__) + '/spec_helper' module LessEngineSpecHelper def lessify(string) return Less::Engine.new(string).to_css(:desc) end end describe Less::Engine do include LessEngineSpecHelper describe "to_css" do it "should return p {} for p {}" do lessify('p {}').should == 'p { }' end it "should return css with variable usage" do lessify("@brand_color: #4D926F;\n #header { color: @brand_color; }").should == "#header { color: #4D926F; }" end it "should return css as shown on home page" do lessify("#header { \n color: red;\n a {\n font-weight: bold;\n text-decoration: none;\n }\n}").should == "#header a { font-weight: bold; text-decoration: none; }\n#header { color: red; }" end it "should handle :hover" do lessify("a:hover {\n color: red; }").should == "a:hover { color: red; }" end it "should handle instances of double-quotes" do lessify("blockquote:before, blockquote:after, q:before, q:after {\n content: \"\"; }").should == "blockquote:before, blockquote:after, q:before, q:after { content: ''; }" end it "should parse tag attributes" do lessify("input[type=text] { color: red; }").should == "input[type=text] { color: red; }" end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
cloudhead-less-0.8.11 | spec/engine_spec.rb |
less-0.8.11 | spec/engine_spec.rb |