Sha256: 721bf427294eda5d45d308d7a58ac6e0410f1e210fbbe0d37c8e8f7b446cd0ee

Contents?: true

Size: 889 Bytes

Versions: 23

Compression:

Stored size: 889 Bytes

Contents

require "spec_helper"

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

23 entries across 23 versions & 3 rubygems

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