Sha256: e0eaa406eea056310fce7d80f10d49ac1810f9f41defd865e15a526727dee036

Contents?: true

Size: 890 Bytes

Versions: 16

Compression:

Stored size: 890 Bytes

Contents

require "spec_helper"

describe "is-size" do
  before(:all) do
    ParserSupport.parse_file("validators/is-size")
  end

  context "called with integer" do
    it "is not a size" do
      expect(".integer").to_not have_rule("margin-top: 1")
    end
  end

  context "called with px" do
    it "is a size" do
      expect(".px").to have_rule("margin-top: 2px")
    end
  end

  context "called with em" do
    it "is a size" do
      expect(".em").to have_rule("margin-top: 3em")
    end
  end

  context "called with rem" do
    it "is a size" do
      expect(".rem").to have_rule("margin-top: 4rem")
    end
  end

  context "called with percent" do
    it "is a size" do
      expect(".percent").to have_rule("margin-top: 5%")
    end
  end

  context "called with string" do
    it "is not a size" do
      expect(".string").to_not have_rule("margin-top: \"stringy\"")
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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