Sha256: d3ee70a77dd5c7e4f8ca444c2e108f953e4d001ab5290840ca9068962cf38ddf

Contents?: true

Size: 887 Bytes

Versions: 10

Compression:

Stored size: 887 Bytes

Contents

require "spec_helper"

describe "compact-shorthand" do
  before(:all) do
    ParserSupport.parse_file("utilities/compact-shorthand")
  end

  context "compact-shorthand" do
    it "returns four values unaltered" do
      expect(".four-values-a").to have_rule("padding: 10px 20px 30px 40px")
    end

    it "returns four values when the left and right values are not equal" do
      expect(".four-values-b").to have_rule("padding: 5px 10px 5px 20px")
    end

    it "compacts four values to two values when the top/bottom and " +
       "left/right values are equal" do
      expect(".two-values").to have_rule("padding: 50px 100px")
    end

    it "compacts four values to one value when they all match" do
      expect(".one-value").to have_rule("padding: 10px")
    end

    it "skips null values" do
      expect(".null-value").to have_rule("padding: 10px 20px")
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bourbon-7.3.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-7.2.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-7.1.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-7.0.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-6.0.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-5.1.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-5.0.1 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-5.0.0 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-5.0.0.beta.8 spec/bourbon/utilities/compact_shorthand_spec.rb
bourbon-5.0.0.beta.7 spec/bourbon/utilities/compact_shorthand_spec.rb