Debian Codegraph @

spec/bourbon/utilities/compact_shorthand_spec.rb

raw
1 require "spec_helper"
2
3 describe "compact-shorthand" do
4 before(:all) do
5 ParserSupport.parse_file("utilities/compact-shorthand")
6 end
7
8 context "compact-shorthand" do
9 it "returns four values unaltered" do
10 expect(".four-values-a").to have_rule("padding: 10px 20px 30px 40px")
11 end
12
13 it "returns four values when the left and right values are not equal" do
14 expect(".four-values-b").to have_rule("padding: 5px 10px 5px 20px")
15 end
16
17 it "compacts four values to two values when the top/bottom and " +
18 "left/right values are equal" do
19 expect(".two-values").to have_rule("padding: 50px 100px")
20 end
21
22 it "compacts four values to one value when they all match" do
23 expect(".one-value").to have_rule("padding: 10px")
24 end
25
26 it "skips null values" do
27 expect(".null-value").to have_rule("padding: 10px 20px")
28 end
29 end
30 end