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.60.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.59.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.58.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.57.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.57.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.56.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.55.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.54.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.53.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.52.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.51.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.50.3 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.50.2 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.50.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.50.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.49.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.48.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.47.1 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.47.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb
scss_lint-0.46.0 spec/scss_lint/linter/compass/property_with_mixin_spec.rb