From 104f3cbf44e62bafedb72b21634f2b37fb024df6 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Fri, 9 Dec 2011 21:26:43 -0500 Subject: [PATCH] moved test to correct spot --- test/units/sprites/image_test.rb | 20 -------------------- test/units/sprites/sprite_map_test.rb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/test/units/sprites/image_test.rb b/test/units/sprites/image_test.rb index 823fb0e6..d1b3b0e4 100644 --- a/test/units/sprites/image_test.rb +++ b/test/units/sprites/image_test.rb @@ -82,24 +82,4 @@ class SpritesImageTest < Test::Unit::TestCase assert_equal 0, img.offset end - - test 'gets name for sprite in search path' do - Compass.reset_configuration! - uri = 'foo/*.png' - other_folder = File.join(@images_tmp_path, '../other-temp') - FileUtils.mkdir_p other_folder - FileUtils.mkdir_p File.join(other_folder, 'foo') - %w(my bar).each do |file| - FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) - end - config = Compass::Configuration::Data.new('config') - config.images_path = @images_tmp_path - config.sprite_load_path = [@images_tmp_path, other_folder] - Compass.add_configuration(config, "sprite_config") - image = Compass::SassExtensions::Sprites::Image.new(test_map, "foo/my.png", {}) - assert_equal File.join(other_folder, 'foo/my.png'), image.file - assert_equal 0, image.size - FileUtils.rm_rf other_folder - end - end diff --git a/test/units/sprites/sprite_map_test.rb b/test/units/sprites/sprite_map_test.rb index 6083cbed..83a38bcc 100644 --- a/test/units/sprites/sprite_map_test.rb +++ b/test/units/sprites/sprite_map_test.rb @@ -109,5 +109,24 @@ class SpriteMapTest < Test::Unit::TestCase base = sprite_map_test(@options.merge('selectors_ten_by_ten_position' => percent)) assert_equal percent, base.image_for('ten-by-ten').position end + + test 'gets name for sprite in search path' do + Compass.reset_configuration! + uri = 'foo/*.png' + other_folder = File.join(@images_tmp_path, '../other-temp') + FileUtils.mkdir_p other_folder + FileUtils.mkdir_p File.join(other_folder, 'foo') + %w(my bar).each do |file| + FileUtils.touch(File.join(other_folder, "foo/#{file}.png")) + end + config = Compass::Configuration::Data.new('config') + config.images_path = @images_tmp_path + config.sprite_load_path = [@images_tmp_path, other_folder] + Compass.add_configuration(config, "sprite_config") + image = Compass::SassExtensions::Sprites::Image.new(@basegit status, "foo/my.png", {}) + assert_equal File.join(other_folder, 'foo/my.png'), image.file + assert_equal 0, image.size + FileUtils.rm_rf other_folder + end end \ No newline at end of file