Sha256: eda8c274ed2e99a57c08087439c38e37c3af12831e2ac13f6f0b9dfeb0c46858

Contents?: true

Size: 879 Bytes

Versions: 2

Compression:

Stored size: 879 Bytes

Contents

require 'spec_helper'

describe SCSSLint::Linter::ChainedClasses do
  context 'with a single class' do
    let(:scss) { <<-SCSS }
      .class {}
    SCSS

    it { should_not report_lint }
  end

  context 'with a single class with a descendant ' do
    let(:scss) { <<-SCSS }
      .class .descendant {}
    SCSS

    it { should_not report_lint }
  end

  context 'with a chained class' do
    let(:scss) { <<-SCSS }
      .chained.class {}
    SCSS

    it { should report_lint line: 1 }
  end

  context 'with a chained class in a nested rule set' do
    let(:scss) { <<-SCSS }
      p {
        .chained.class {}
      }
    SCSS

    it { should report_lint line: 2 }
  end

  context 'with a chained class in part of a sequence' do
    let(:scss) { <<-SCSS }
      .some .sequence .with .chained.class .in .it {}
    SCSS

    it { should report_lint line: 1 }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scss_lint-0.43.1 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.43.0 spec/scss_lint/linter/chained_classes_spec.rb