Sha256: cd7298470c08c7ccc52b037aa62c5035005cb0453469b658ae7715e00ed9e456

Contents?: true

Size: 805 Bytes

Versions: 40

Compression:

Stored size: 805 Bytes

Contents

require 'spec_helper'

describe SCSSLint::Linter::ImportantRule do
  context 'when !important is not used' do
    let(:scss) { <<-SCSS }
      p {
        color: #000;
      }
    SCSS

    it { should_not report_lint }
  end

  context 'when !important is used' do
    let(:scss) { <<-SCSS }
      p {
        color: #000 !important;
      }
    SCSS

    it { should report_lint line: 2 }
  end

  context 'when !important is used in property containing Sass script' do
    let(:scss) { <<-SCSS }
      p {
        color: \#{$my-var} !important;
      }
    SCSS

    it { should report_lint line: 2 }
  end

  context 'when property contains a list literal with an empty list' do
    let(:scss) { <<-SCSS }
      p {
        content: 0 ();
      }
    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/important_rule_spec.rb
scss_lint-0.44.0 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.43.2 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.43.1 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.43.0 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.42.2 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.42.1 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.42.0 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.41.0 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.40.1 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.40.0 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.39.0 spec/scss_lint/linter/important_rule_spec.rb
scss_lint-0.38.0 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-0.38.0 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-bliss-1.0.0 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-0.37.0 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-0.36.1 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-0.36.0 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-0.35.0 spec/scss_lint/linter/important_rule_spec.rb
scss-lint-0.34.0 spec/scss_lint/linter/important_rule_spec.rb