Sha256: d301cc01cae2b55f854fc6b826666a1581d1fc0ff0502dd30700b83fe99390ed

Contents?: true

Size: 1.03 KB

Versions: 23

Compression:

Stored size: 1.03 KB

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

  context 'with a chained class in a multiline comma sequence' do
    let(:scss) { <<-SCSS }
      .one,
      .two.three {}
    SCSS

    it { should report_lint line: 2 }
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
scss_lint-0.60.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.59.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.58.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.57.1 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.57.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.56.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.55.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.54.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.53.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.52.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.51.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.50.3 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.50.2 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.50.1 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.50.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.49.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.48.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.47.1 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.47.0 spec/scss_lint/linter/chained_classes_spec.rb
scss_lint-0.46.0 spec/scss_lint/linter/chained_classes_spec.rb