Sha256: 31f8160824bf40a5c3fce98855e4ca3aece564f9c64bac6961d84b44fbe2c33e

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe SCSSLint::Linter::PropertySpelling do
  context 'with a regular property' do
    let(:css) { <<-CSS }
      p {
        margin: 5px;
      }
    CSS

    it { should_not report_lint }
  end

  context 'with a property containing interpolation' do
    let(:css) { <<-CSS }
      p {
        \#{$property-name}: 5px;
      }
    CSS

    it { should_not report_lint }
  end

  context 'with a non-existent property' do
    let(:css) { <<-CSS }
      p {
        peanut-butter: jelly-time;
      }
    CSS

    it { should report_lint }
  end

  context 'when extra properties are specified' do
    let(:linter_config) { { 'extra_properties' => ['made-up-property'] } }

    context 'with a non-existent property' do
      let(:css) { <<-CSS }
        p {
          peanut-butter: jelly-time;
        }
      CSS

      it { should report_lint }
    end

    context 'with a property listed as an extra property' do
      let(:css) { <<-CSS }
        p {
          made-up-property: value;
        }
      CSS

      it { should_not report_lint }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scss-lint-0.29.0 spec/scss_lint/linter/property_spelling_spec.rb
scss-lint-0.28.0 spec/scss_lint/linter/property_spelling_spec.rb
scss-lint-0.27.0 spec/scss_lint/linter/property_spelling_spec.rb
scss-lint-0.26.2 spec/scss_lint/linter/property_spelling_spec.rb
scss-lint-0.26.1 spec/scss_lint/linter/property_spelling_spec.rb
scss-lint-0.26.0 spec/scss_lint/linter/property_spelling_spec.rb