Testing CSS Ellipsis Text Truncation Implementation in Bourbon
This test suite validates the ellipsis mixin functionality in the Bourbon library, ensuring proper CSS text truncation behavior. The tests verify the correct application of CSS properties for text overflow handling and display characteristics.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
thoughtbot/bourbon
spec/bourbon/library/ellipsis_spec.rb
require "spec_helper"
describe "ellipsis" do
before(:all) do
ParserSupport.parse_file("library/ellipsis")
end
context "called on element" do
it "adds ellipsis" do
ruleset = "display: inline-block; " +
"max-width: 100%; " +
"overflow: hidden; " +
"text-overflow: ellipsis; " +
"white-space: nowrap; " +
"word-wrap: normal;"
expect(".ellipsis").to have_ruleset(ruleset)
end
end
end