Permalink
Browse files

Merge pull request #998 from ericam/stable

Update tests to Sass 3.2
  • Loading branch information...
2 parents 09f22d0 + 0e0da32 commit efadc9c5d7afbdd8ba270b35e2cc395bcee90559 @chriseppstein chriseppstein committed Aug 21, 2012
View
@@ -8,14 +8,14 @@ unless ENV['PKG']
gem "rails", "~> 3.1"
gem "compass-validator", "3.0.1"
gem "css_parser", "~> 1.0.1"
- gem "sass", "~> 3.1"
+ gem "sass", "~> 3.2"
gem "haml", "~> 3.1"
gem "rubyzip"
gem 'mocha'
gem 'diff-lcs', '~> 1.1.2'
gem 'rake', '~> 0.9.2'
- # Warning becarful adding OS dependant gems above this line it will break the CI server please
+ # Warning becarful adding OS dependant gems above this line it will break the CI server please
# place them below so they are excluded
unless ENV["CI"]
Oops, something went wrong.
Oops, something went wrong.
@@ -7,7 +7,7 @@ p + p {
p.incr,
.incr p {
- font-size: 0.833em;
+ font-size: 0.83333em;
line-height: 1.44em;
margin-bottom: 1.5em; }
@@ -3,7 +3,13 @@ html {
padding: 0;
border: 0; }
-.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, blockquote, q, th, td, caption, table, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing details, body.testing figcaption, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing menu, body.testing nav, body.testing section, body.testing summary, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table, div, span, object, iframe, p, pre, a, abbr, acronym, address, code, del, dfn, em, img, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
+.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, blockquote, q, th, td, caption, table, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing details, body.testing figcaption, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing menu, body.testing nav, body.testing section, body.testing summary, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table,
+div, span, object, iframe, p,
+pre, a, abbr, acronym, address,
+code, del, dfn, em, img,
+dl, dt, dd, ol, ul, li, fieldset,
+form, label, legend,
+caption, tbody, tfoot, thead, tr {
margin: 0;
padding: 0;
border: 0;
Oops, something went wrong.
@@ -3,43 +3,43 @@
html {
font-size: 14px;
- line-height: 1.143em; }
+ line-height: 1.14286em; }
.small {
- font-size: 0.857em;
- line-height: 1.333em; }
+ font-size: 0.85714em;
+ line-height: 1.33333em; }
.padded {
- margin-top: 1.143em;
- padding-top: 1.143em;
- padding-bottom: 1.143em;
- margin-bottom: 1.143em; }
+ margin-top: 1.14286em;
+ padding-top: 1.14286em;
+ padding-bottom: 1.14286em;
+ margin-bottom: 1.14286em; }
.small-padded {
- font-size: 0.857em;
- line-height: 1.333em;
- margin-top: 1.333em;
- padding-top: 1.333em;
- padding-bottom: 1.333em;
- margin-bottom: 1.333em; }
+ font-size: 0.85714em;
+ line-height: 1.33333em;
+ margin-top: 1.33333em;
+ padding-top: 1.33333em;
+ padding-bottom: 1.33333em;
+ margin-bottom: 1.33333em; }
.borders {
border-top-style: solid;
- border-top-width: 0.071em;
- padding-top: 1.071em;
+ border-top-width: 0.07143em;
+ padding-top: 1.07143em;
border-bottom-style: solid;
- border-bottom-width: 0.071em;
- padding-bottom: 1.071em; }
+ border-bottom-width: 0.07143em;
+ padding-bottom: 1.07143em; }
.large-borders {
- font-size: 1.714em;
+ font-size: 1.71429em;
line-height: 2em;
border-top-style: solid;
border-top-width: 0.25em;
- padding-top: 0.417em;
+ padding-top: 0.41667em;
border-bottom-style: solid;
border-bottom-width: 0.25em;
- padding-bottom: 0.417em; }
+ padding-bottom: 0.41667em; }
.reset {
- line-height: 1.143em; }
+ line-height: 1.14286em; }
@@ -23,7 +23,7 @@ def test_third_argument_expansion
def test_enumerate
assert_equal ".grid-1, .grid-2, .grid-3", evaluate(%Q{enumerate(".grid", 1, 3, "-")})
end
-
+
def test_append_selector
assert_equal "div.bar", evaluate(%Q{append_selector("div", ".bar")})
assert_equal ".foo1.bar1, .foo1.bar2, .foo2.bar1, .foo2.bar2", evaluate(%Q{append_selector(".foo1, .foo2", ".bar1, .bar2")})
@@ -75,24 +75,24 @@ def test_if_function
end
def test_math_functions
- assert_equal "0.841", evaluate("sin(1)")
- assert_equal "0.841px", evaluate("sin(1px)")
+ assert_equal "0.84147", evaluate("sin(1)")
+ assert_equal "0.84147px", evaluate("sin(1px)")
assert_equal "0.0", evaluate("sin(pi())")
assert_equal "1", evaluate("sin(pi() / 2)")
assert_equal "0.0", evaluate("sin(180deg)")
assert_equal "-1", evaluate("sin(3* pi() / 2)")
assert_equal "-1", evaluate("cos(pi())")
assert_equal "1", evaluate("cos(360deg)")
- assert_equal "-0.176", evaluate("sin(270)")
+ assert_equal "-0.17605", evaluate("sin(270)")
assert_equal "1", evaluate("cos(2*pi())")
assert_equal "0.0", evaluate("cos(pi() / 2)")
assert_equal "0.0", evaluate("cos(3* pi() / 2)")
assert_equal "0.0", evaluate("tan(pi())")
assert_equal "0.0", evaluate("tan(360deg)")
- assert_equal "0.959", evaluate("sin(360)")
+ assert_equal "0.95892", evaluate("sin(360)")
assert evaluate("tan(pi()/2 - 0.0001)").to_f > 1000, evaluate("tan(pi()/2 - 0.0001)")
assert evaluate("tan(pi()/2 + 0.0001)").to_f < -1000, evaluate("tan(pi()/2 - 0.0001)")
- assert_equal "0.693px", evaluate("logarithm(2px)")
+ assert_equal "0.69315px", evaluate("logarithm(2px)")
assert_equal "0", evaluate("logarithm(1)")
assert_equal "1", evaluate("logarithm(e())")
assert_equal "1", evaluate("logarithm($number: e())")
@@ -103,7 +103,7 @@ def test_math_functions
assert_equal "5px", evaluate("square-root($number: 25px)")
assert_equal "25px", evaluate("pow(5px, 2)")
assert_equal "25px", evaluate("pow($number: 5px, $exponent: 2)")
- assert_equal "79.432px", evaluate("pow(5px, e())")
+ assert_equal "79.43236px", evaluate("pow(5px, e())")
end
def test_blank
@@ -176,16 +176,16 @@ def test_inline_font_files
base64_string = File.read(File.join(Compass.configuration.fonts_path, "bgrove.base64.txt")).chomp
assert_equal "url('data:font/truetype;base64,#{base64_string}') format('truetype')", evaluate("inline_font_files('bgrove.ttf', truetype)")
end
-
-
+
+
def test_image_size_should_respond_to_to_path
object = mock()
object.expects(:to_path).returns('foo.jpg')
object.expects(:respond_to?).with(:to_path).returns(true)
-
+
Compass::SassExtensions::Functions::ImageSize::ImageProperties.new(object)
end
-
+
def test_reject
assert_equal "b d", evaluate("reject(a b c d, a, c)")
assert_equal "a b c d", evaluate("reject(a b c d, e)")

0 comments on commit efadc9c

Please sign in to comment.