Sha256: 9540d309f0f76951b4c9b337afde8fbb2b6be6aec3e52a56aa5fef4fc1ef0218

Contents?: true

Size: 859 Bytes

Versions: 40

Compression:

Stored size: 859 Bytes

Contents

require 'spec_helper'

describe SCSSLint::Linter::SpaceAfterPropertyName do
  context 'when a property name is followed by a space' do
    let(:scss) { <<-SCSS }
      p {
        margin : 0;
      }
    SCSS

    it { should report_lint line: 2 }
  end

  context 'when a property name is not followed by a space' do
    let(:scss) { <<-SCSS }
      p {
        margin: 0;
      }
    SCSS

    it { should_not report_lint }
  end

  context 'when interpolation within single quotes is followed by inline property' do
    context 'and property name is followed by a space' do
      let(:scss) { "[class~='\#{$test}'] { width: 100%; }" }

      it { should_not report_lint }
    end

    context 'and property name is not followed by a space' do
      let(:scss) { "[class~='\#{$test}'] { width : 100%; }" }

      it { should report_lint }
    end
  end
end

Version data entries

40 entries across 40 versions & 3 rubygems

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