Sha256: f2929580605637e73411d2c5482d189077c57a19afac79415c627fe9df3dc727

Contents?: true

Size: 685 Bytes

Versions: 21

Compression:

Stored size: 685 Bytes

Contents

require "spec_helper"

describe "px-to-em" do
  before(:all) do
    ParserSupport.parse_file("functions/px-to-em")
  end

  context "called with unitless integer" do
    it "outputs ems" do
      expect(".unitless").to have_rule("font-size: 0.75em")
    end
  end

  context "called with unitless integer and base" do
    it "outputs ems" do
      expect(".unitless-with-base").to have_rule("font-size: 0.66667em")
    end
  end

  context "called with px" do
    it "outputs ems" do
      expect(".px").to have_rule("font-size: 1em")
    end
  end

  context "called with px" do
    it "outputs ems" do
      expect(".px-with-base").to have_rule("font-size: 1.5em")
    end
  end
end

Version data entries

21 entries across 21 versions & 3 rubygems

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