sprite importer will now error if it does not find the associated glob
This commit is contained in:
parent
11cf736066
commit
7198a69909
@ -7,4 +7,5 @@ module Compass
|
||||
|
||||
class MissingDependency < Error
|
||||
end
|
||||
class SpriteException < Error; end
|
||||
end
|
||||
|
@ -2,7 +2,6 @@ require 'digest/md5'
|
||||
require 'compass/sprite_importer'
|
||||
|
||||
module Compass
|
||||
class SpriteException < Exception; end
|
||||
module SassExtensions
|
||||
module Sprites
|
||||
end
|
||||
|
@ -79,6 +79,9 @@ module Compass
|
||||
next if files.empty?
|
||||
return files
|
||||
end
|
||||
|
||||
path = Compass.configuration.sprite_load_path.to_a.join(', ')
|
||||
raise Compass::SpriteException, %Q{No files were found in the load path matching "#{uri}". Your current load paths are: #{path}}
|
||||
end
|
||||
|
||||
# Returns an Array of image names without the file extension
|
||||
|
@ -47,7 +47,7 @@ class SpriteCommandTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
it "should create sprite file" do
|
||||
assert_equal 0, run_compass_with_options(['sprite', "-f", 'stylesheet.scss', "'#{@images_tmp_path}/*.png'"]).to_i
|
||||
assert_equal 0, run_compass_with_options(['sprite', "-f", 'stylesheet.scss', "squares/*.png"]).to_i
|
||||
assert File.exists?(File.join(test_dir, 'stylesheet.scss'))
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user