Sha256: 1e237e15029da2af2083ba4d4f0c6e1a3047c4845f09679ab1dd34453040ad83

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 KB

Contents

require "spec_helper"

describe "modular-scale" do
  before(:all) do
    ParserSupport.parse_file("library/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.5em")
    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.75em")
    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.024em")
    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.5625em")
    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.125em")
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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