Sha256: 6d2b3badb0ce3b13423a7216e93c198232f77c8ab9d7b3035dddfc164422a09b

Contents?: true

Size: 1.32 KB

Versions: 22

Compression:

Stored size: 1.32 KB

Contents

require "spec_helper"

describe "modular-scale" do
  before(:all) do
    ParserSupport.parse_file("functions/modular-scale")
  end

  context "called with arguments (1, $value: 2em)" do
    it "outputs double the first value from the default scale" do
      expect(".one-base-two").to have_rule("font-size: 2.666em")
    end
  end

  context "called with arguments (1, $value: 3em)" do
    it "outputs triple the first value from the default scale" do
      expect(".one-base-three").to have_rule("font-size: 3.999em")
    end
  end

  context "called with arguments (1, $value: 4em 6em)" do
    it "outputs quadruple the first value from the default scale" do
      expect(".one-double-value").to have_rule("font-size: 1.12556em")
    end
  end

  context "called with arguments (1, $ratio: $golden-ratio)" do
    it "output the first value from the golden ratio scale" do
      expect(".one-golden-ratio").to have_rule("font-size: 1.618em")
    end
  end

  context "called with argument (2)" do
    it "outputs the second value from the default scale" do
      expect(".two-base-one").to have_rule("font-size: 1.77689em")
    end
  end

  context "called with arguments (2, $value: 4em 6em)" do
    it "outputs sextuple the second value from the default scale" do
      expect(".two-double-value").to have_rule("font-size: 3.55378em")
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

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