test/unit/font_importer_test.rb in compass-fontcustom-1.0.0.pre3 vs test/unit/font_importer_test.rb in compass-fontcustom-1.0.0
- old
+ new
@@ -17,11 +17,11 @@
css_dir = #{".output".inspect}
SCSS
Compass.add_configuration(config, "fontcustom_config")
Compass::Fontcustom::GlyphMap.configure do |config|
- config.generator_options = { :debug => true }
+ config.generator_options = { :debug => false }
end
end
def teardown
Compass.reset_configuration!
@@ -67,8 +67,27 @@
assert File.exists? File.join(Compass.configuration.fonts_path, 'myfont.woff')
assert css =~ %r{.#{fontname}-font}, "base font class missing"
assert css =~ %r{.icon-#{fontname}-c}i, "icon c css class missing"
assert css =~ %r{.icon-#{fontname}-d}i, "icon d css class missing"
+ end
+
+ def test_glyph_mixin
+ fontname = 'myfont'
+
+ Compass.configuration.fontcustom_hash = false
+
+ css = render <<-SCSS
+ @import "#{fontname}/*.svg";
+ @include fontcustom-font-face($myfont-glyphs);
+
+ .custom-class-name {
+ @include myfont-glyph(C);
+ }
+ SCSS
+
+ assert css =~ %r{.#{fontname}-font, .custom-class-name}, "extending base class missing"
+ assert css =~ %r{@font-face}, "font-face definition missing"
+ assert css =~ %r{.custom-class-name:before}, "cusom class missing missing"
end
end