Sha256: 434a977acc31a0d90fba1e81e3295c61c5dc490e84a6a5e53cd953a472bc870d

Contents?: true

Size: 1.17 KB

Versions: 12

Compression:

Stored size: 1.17 KB

Contents

require "spec_helper"

describe "is-length" do
  before(:all) do
    ParserSupport.parse_file("validators/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

12 entries across 12 versions & 2 rubygems

Version Path
bourbon-6.0.0 spec/bourbon/validators/is_length_spec.rb
bourbon-5.1.0 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.1 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0.beta.8 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0.beta.7 spec/bourbon/validators/is_length_spec.rb
doggystyle-0.1.0 spec/doggystyle/validators/is_length_spec.rb
bourbon-5.0.0.beta.6 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0.beta.5 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0.beta.4 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0.beta.3 spec/bourbon/validators/is_length_spec.rb
bourbon-5.0.0.beta.2 spec/bourbon/validators/is_length_spec.rb