Testing Font-Face Mixin Implementation in Bourbon
This test suite validates the font-face mixin functionality in Bourbon, specifically focusing on default font configuration and WOFF2 format handling. The tests ensure proper CSS ruleset generation for web font declarations.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
thoughtbot/bourbon
spec/bourbon/library/font_face_spec_3.rb
require "spec_helper"
describe "font-face" do
before(:all) do
ParserSupport.parse_file("library/font-face-3")
end
context "called with defaults" do
it "outputs defaults" do
ruleset = 'font-family: "pitch";' +
'src: font-url("/fonts/pitch.woff2") format("woff2");'
expect("@font-face").to have_ruleset(ruleset)
end
end
end