Sha256: 79dd6f3a9efed1308a70ff0665048273f255e4d6342365ebb11bf263dbf73093

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe SCSSLint::Linter::Compass::PropertyWithMixin do
  context 'when a rule has a property with an equivalent Compass mixin' do
    let(:css) { <<-CSS }
      p {
        opacity: .5;
      }
    CSS

    it { should report_lint line: 2 }
  end

  context 'when a rule includes a Compass property mixin' do
    let(:css) { <<-CSS }
      p {
        @include opacity(.5);
      }
    CSS

    it { should_not report_lint }
  end

  context 'when a rule does not have a property with a corresponding Compass mixin' do
    let(:css) { <<-CSS }
      p {
        margin: 0;
      }
    CSS

    it { should_not report_lint }
  end

  context 'when a rule includes display: inline-block' do
    let(:css) { <<-CSS }
      p {
        display: inline-block;
      }
    CSS

    it { should report_lint line: 2 }
  end

  context 'when properties are ignored' do
    let(:linter_config) { { 'ignore' => %w[inline-block] } }

    let(:css) { <<-CSS }
      p {
        display: inline-block;
      }
    CSS

    it { should_not report_lint }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
scss-lint-0.33.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.32.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.31.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.30.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.29.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.28.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.27.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.26.2 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.26.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.26.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb