Sha256: ad9ffdb227807cde8861ecf3a82838423d092698ceac04f458c3969bdce558cd

Contents?: true

Size: 1.33 KB

Versions: 16

Compression:

Stored size: 1.33 KB

Contents

require "spec_helper"

describe "border-style" do
  before(:all) do
    ParserSupport.parse_file("library/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

16 entries across 16 versions & 2 rubygems

Version Path
bourbon-7.3.0 spec/bourbon/library/border_style_spec.rb
bourbon-7.2.0 spec/bourbon/library/border_style_spec.rb
bourbon-7.1.0 spec/bourbon/library/border_style_spec.rb
bourbon-7.0.0 spec/bourbon/library/border_style_spec.rb
bourbon-6.0.0 spec/bourbon/library/border_style_spec.rb
bourbon-5.1.0 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.1 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0.beta.8 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0.beta.7 spec/bourbon/library/border_style_spec.rb
doggystyle-0.1.0 spec/doggystyle/library/border_style_spec.rb
bourbon-5.0.0.beta.6 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0.beta.5 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0.beta.4 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0.beta.3 spec/bourbon/library/border_style_spec.rb
bourbon-5.0.0.beta.2 spec/bourbon/library/border_style_spec.rb