Sha256: e8fa63dde5f338887a31a6de400cdef2362f887d56ee76e5b9068c27f2c8cdaf

Contents?: true

Size: 1.17 KB

Versions: 23

Compression:

Stored size: 1.17 KB

Contents

require "spec_helper"

describe "is-length" do
  before(:all) do
    ParserSupport.parse_file("functions/is-length")
  end

  context "checks if unitless integer can be represented as a length" do
    it "returns false" do
      expect(".integer").not_to have_rule("color: #fff")
    end
  end

  context "checks if px can be represented as a length" do
    it "returns true" do
      expect(".pixels").to have_rule("color: #fff")
    end
  end

  context "checks if em can be represented as a length" do
    it "returns true" do
      expect(".ems").to have_rule("color: #fff")
    end
  end

  context "checks if percent can be represented as a length" do
    it "returns true" do
      expect(".percent").to have_rule("color: #fff")
    end
  end

  context "parses calculated values" do
    it "returns true" do
      expect(".calc").to have_rule("color: #fff")
    end
  end

  context "checks if strings can be represented as a length" do
    it "returns false" do
      expect(".string").not_to have_rule("color: #fff")
    end
  end

  context "checks if null can be represented as a length" do
    it "returns false" do
      expect(".null").not_to have_rule("color: #fff")
    end
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

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