Sha256: 55e12950bd622597e4e1c003aaf4286d84fd3a831e7ff13ace8c44734e888330

Contents?: true

Size: 1.06 KB

Versions: 40

Compression:

Stored size: 1.06 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(:scss) { <<-SCSS }
      p {
        opacity: .5;
      }
    SCSS

    it { should report_lint line: 2 }
  end

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

    it { should_not report_lint }
  end

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

    it { should_not report_lint }
  end

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

    it { should report_lint line: 2 }
  end

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

    let(:scss) { <<-SCSS }
      p {
        display: inline-block;
      }
    SCSS

    it { should_not report_lint }
  end
end

Version data entries

40 entries across 40 versions & 3 rubygems

Version Path
scss_lint-0.45.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.44.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.43.2 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.43.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.43.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.42.2 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.42.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.42.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.41.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.40.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.40.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.39.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.38.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.38.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-bliss-1.0.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.37.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.36.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.36.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.35.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss-lint-0.34.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb