Sha256: 497b453635a14876d6043362b3422a7a66f19cb58747743eab1d7f45b184428e

Contents?: true

Size: 594 Bytes

Versions: 17

Compression:

Stored size: 594 Bytes

Contents

require "spec_helper"

describe "str-to-num" do
  before(:all) do
    ParserSupport.parse_file("helpers/str-to-num")
  end

  context "called with integer string" do
    it "is converted to integer" do
      expect(".string-to-integer").to have_rule("height: 10")
    end
  end

  context "called with px string" do
    it "is converted to px" do
      expect(".string-to-px").to have_rule("height: 15px")
    end
  end

  context "called with negative px string" do
    it "is converted to negative px" do
      expect(".string-to-negative-px").to have_rule("height: -25px")
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

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