From fc46730b36191c8b5e2993f2f1d9e627d982784a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 23 Dec 2011 16:53:23 -0800 Subject: [PATCH] Fix broken tests. --- lib/compass/sass_extensions/functions/lists.rb | 5 +++++ test/fixtures/stylesheets/compass/css/lists.css | 14 +++++++------- test/fixtures/stylesheets/compass/css/reset.css | 1 - 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/compass/sass_extensions/functions/lists.rb b/lib/compass/sass_extensions/functions/lists.rb index a9e15a0c..384a270c 100644 --- a/lib/compass/sass_extensions/functions/lists.rb +++ b/lib/compass/sass_extensions/functions/lists.rb @@ -74,6 +74,11 @@ module Compass::SassExtensions::Functions::Lists Sass::Script::List.new list.values[start_index..end_index], list.separator end + # removes the given values from the list. + def reject(list, *values) + Sass::Script::List.new(list.values.reject{|v| values.any?{|o| v == o}}, list.separator) + end + # returns the first value of a space delimited list. def first_value_of(list) if list.is_a?(Sass::Script::String) diff --git a/test/fixtures/stylesheets/compass/css/lists.css b/test/fixtures/stylesheets/compass/css/lists.css index 8e7b1a58..130d3041 100644 --- a/test/fixtures/stylesheets/compass/css/lists.css +++ b/test/fixtures/stylesheets/compass/css/lists.css @@ -7,7 +7,7 @@ ul.horizontal { ul.horizontal li { list-style-image: none; list-style-type: none; - margin-left: 0px; + margin-left: 0; white-space: nowrap; display: inline; float: left; @@ -29,7 +29,7 @@ ul.wide-horizontal { ul.wide-horizontal li { list-style-image: none; list-style-type: none; - margin-left: 0px; + margin-left: 0; white-space: nowrap; display: inline; float: left; @@ -51,7 +51,7 @@ ul.right-horizontal { ul.right-horizontal li { list-style-image: none; list-style-type: none; - margin-left: 0px; + margin-left: 0; white-space: nowrap; display: inline; float: right; @@ -73,7 +73,7 @@ ul.no-padding { ul.no-padding li { list-style-image: none; list-style-type: none; - margin-left: 0px; + margin-left: 0; white-space: nowrap; display: inline; float: left; } @@ -87,7 +87,7 @@ ul.inline-block { ul.inline-block li { list-style-image: none; list-style-type: none; - margin-left: 0px; + margin-left: 0; display: -moz-inline-box; -moz-box-orient: vertical; display: inline-block; @@ -106,7 +106,7 @@ ul.wide-inline-block { ul.wide-inline-block li { list-style-image: none; list-style-type: none; - margin-left: 0px; + margin-left: 0; display: -moz-inline-box; -moz-box-orient: vertical; display: inline-block; @@ -143,7 +143,7 @@ ul.no-bullets { ul.no-bullets li { list-style-image: none; list-style-type: none; - margin-left: 0px; } + margin-left: 0; } ul.pretty { margin-left: 0; } diff --git a/test/fixtures/stylesheets/compass/css/reset.css b/test/fixtures/stylesheets/compass/css/reset.css index dd912b3e..388217c4 100644 --- a/test/fixtures/stylesheets/compass/css/reset.css +++ b/test/fixtures/stylesheets/compass/css/reset.css @@ -50,7 +50,6 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, body.registered a.registered-only, body.registered abbr.registered-only, body.registered acronym.registered-only, body.registered audio.registered-only, body.registered b.registered-only, body.registered basefont.registered-only, body.registered bdo.registered-only, body.registered big.registered-only, body.registered br.registered-only, body.registered canvas.registered-only, body.registered cite.registered-only, body.registered code.registered-only, body.registered command.registered-only, body.registered datalist.registered-only, body.registered dfn.registered-only, body.registered em.registered-only, body.registered embed.registered-only, body.registered font.registered-only, body.registered i.registered-only, body.registered img.registered-only, body.registered input.registered-only, body.registered keygen.registered-only, body.registered kbd.registered-only, body.registered label.registered-only, body.registered mark.registered-only, body.registered meter.registered-only, body.registered output.registered-only, body.registered progress.registered-only, body.registered q.registered-only, body.registered rp.registered-only, body.registered rt.registered-only, body.registered ruby.registered-only, body.registered s.registered-only, body.registered samp.registered-only, body.registered select.registered-only, body.registered small.registered-only, body.registered span.registered-only, body.registered strike.registered-only, body.registered strong.registered-only, body.registered sub.registered-only, body.registered sup.registered-only, body.registered textarea.registered-only, body.registered time.registered-only, body.registered tt.registered-only, body.registered u.registered-only, body.registered var.registered-only, body.registered video.registered-only, body.registered wbr.registered-only { display: inline; } - body.registered address.registered-only, body.registered article.registered-only, body.registered aside.registered-only, body.registered blockquote.registered-only, body.registered center.registered-only, body.registered dir.registered-only, body.registered div.registered-only, body.registered dd.registered-only, body.registered details.registered-only, body.registered dl.registered-only, body.registered dt.registered-only, body.registered fieldset.registered-only, body.registered figcaption.registered-only, body.registered figure.registered-only, body.registered form.registered-only, body.registered footer.registered-only, body.registered frameset.registered-only, body.registered h1.registered-only, body.registered h2.registered-only, body.registered h3.registered-only, body.registered h4.registered-only, body.registered h5.registered-only, body.registered h6.registered-only, body.registered hr.registered-only, body.registered header.registered-only, body.registered hgroup.registered-only, body.registered isindex.registered-only, body.registered menu.registered-only, body.registered nav.registered-only, body.registered noframes.registered-only, body.registered noscript.registered-only, body.registered ol.registered-only, body.registered p.registered-only, body.registered pre.registered-only, body.registered section.registered-only, body.registered summary.registered-only, body.registered ul.registered-only { display: block; }