added test for diagonal layout
This commit is contained in:
parent
acfd1e43a2
commit
26b2d1fcba
@ -90,6 +90,21 @@ class SpriteMapTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
|
||||
def diagonal
|
||||
opts = @options.merge("layout" => Sass::Script::String.new('diagonal'))
|
||||
sprite_map_test(opts)
|
||||
end
|
||||
|
||||
it "should generate a diagonal sprite" do
|
||||
base = diagonal
|
||||
base.generate
|
||||
assert_equal 40, base.width
|
||||
assert_equal 40, base.height
|
||||
assert_equal [[0,0], [10,10], [20,20], [30,30]], base.images.map {|i| [i.top, i.left]}
|
||||
assert File.exists?(base.filename)
|
||||
FileUtils.rm base.filename
|
||||
end
|
||||
|
||||
# Horizontal tests
|
||||
def horizontal
|
||||
opts = @options.merge("layout" => Sass::Script::String.new('horizontal'))
|
||||
|
Loading…
Reference in New Issue
Block a user