cleaned up test file
This commit is contained in:
parent
bc3334bec9
commit
b67c471780
@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
compass (0.12.alpha.0.7334285)
|
compass (0.12.alpha.0.bc3334b)
|
||||||
chunky_png (~> 1.2)
|
chunky_png (~> 1.2)
|
||||||
fssm (>= 0.2.7)
|
fssm (>= 0.2.7)
|
||||||
sass (~> 3.1)
|
sass (~> 3.1)
|
||||||
|
@ -56,6 +56,10 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
" #{css.gsub('@charset "UTF-8";', '').gsub(/\n/, "\n ").strip}\n"
|
" #{css.gsub('@charset "UTF-8";', '').gsub(/\n/, "\n ").strip}\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def clean(string)
|
||||||
|
string.gsub("\n", '').gsub(' ', '')
|
||||||
|
end
|
||||||
|
|
||||||
it "should generate sprite classes" do
|
it "should generate sprite classes" do
|
||||||
css = render <<-SCSS
|
css = render <<-SCSS
|
||||||
@import "squares/*.png";
|
@import "squares/*.png";
|
||||||
@ -729,7 +733,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
assert_correct css.gsub("\n", '').gsub(' ', ''), other_css.gsub("\n", '').gsub(' ', '')
|
assert_correct clean(css), clean(other_css)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should allow use of demension functions" do
|
it "should allow use of demension functions" do
|
||||||
@ -751,7 +755,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
width:22px;
|
width:22px;
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
assert_correct css.gsub("\n", '').gsub(' ', ''), other_css.gsub("\n", '').gsub(' ', '')
|
assert_correct clean(css), clean(other_css)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should replace text with images and dimensions using sprites" do
|
it "should replace text with images and dimensions using sprites" do
|
||||||
@ -788,7 +792,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
assert_correct css.gsub("\n", '').gsub(' ', ''), other_css.gsub("\n", '').gsub(' ', '')
|
assert_correct clean(css), clean(other_css)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should inline the sprite file" do
|
it "should inline the sprite file" do
|
||||||
@ -807,7 +811,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
background-position:0 -10px;
|
background-position:0 -10px;
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
assert_correct css.gsub("\n", '').gsub(' ', ''), other_css.gsub("\n", '').gsub(' ', '')
|
assert_correct clean(css), clean(other_css)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user