Sha256: 8af95a5d2d04988301109302e03729448a9b2b8cf153375f7d706df21e2ad0e1

Contents?: true

Size: 1.33 KB

Versions: 19

Compression:

Stored size: 1.33 KB

Contents

require "spec_helper"

describe "border-style" do
  before(:all) do
    ParserSupport.parse_file("addons/border-style")
  end

  context "called with one style" do
    it "applies same style to all sides" do
      rule = "border-style: solid"

      expect(".border-style-all").to have_rule(rule)
    end
  end

  context "called with two styles" do
    it "applies to alternating sides" do
      rule = "border-style: dotted dashed"

      expect(".border-style-alternate").to have_rule(rule)
    end
  end

  context "called with three styles" do
    it "applies second style to left and right" do
      rule = "border-style: dashed double solid"

      expect(".border-style-implied-left").to have_rule(rule)
    end
  end

  context "called with four styles" do
    it "applies different styles to all sides" do
      rule = "border-style: dotted groove ridge none"

      expect(".border-style-explicit").to have_rule(rule)
    end
  end

  context "called with null values" do
    it "writes rules for other three" do
      ruleset = "border-top-style: inset; " +
                "border-right-style: none; " +
                "border-left-style: double;"
      bad_rule = "border-bottom-style: null;"

      expect(".border-style-false-third").to have_ruleset(ruleset)
      expect(".border-style-false-third").to_not have_rule(bad_rule)
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
bourbon-4.3.4 spec/bourbon/addons/border_style_spec.rb
bourbon-4.3.3 spec/bourbon/addons/border_style_spec.rb
bourbon-4.3.2 spec/bourbon/addons/border_style_spec.rb
bourbon-4.3.1 spec/bourbon/addons/border_style_spec.rb
bourbon-4.3.0 spec/bourbon/addons/border_style_spec.rb
bourbon-4.2.7 spec/bourbon/addons/border_style_spec.rb
bourbon-5.0.0.beta.1 spec/bourbon/addons/border_style_spec.rb
styler-sass-0.1.8.alpha spec/bourbon/addons/border_style_spec.rb
styler-sass-0.1.7 spec/bourbon/addons/border_style_spec.rb
styler-sass-0.1.7.alpha spec/bourbon/addons/border_style_spec.rb
styler-sass-0.1.5.alpha spec/bourbon/addons/border_style_spec.rb
bourbon-4.2.6 spec/bourbon/addons/border_style_spec.rb
bourbon-4.2.5 spec/bourbon/addons/border_style_spec.rb
bourbon-5.0.0.alpha.0 spec/bourbon/addons/border_style_spec.rb
bourbon-4.2.4 spec/bourbon/addons/border_style_spec.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/bourbon-4.2.3/spec/bourbon/addons/border_style_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/bourbon-4.2.3/spec/bourbon/addons/border_style_spec.rb
bourbon-4.2.3 spec/bourbon/addons/border_style_spec.rb
bourbon-4.2.2 spec/bourbon/addons/border_style_spec.rb