Sha256: 56b97e77c96f622b7a1d00de28fdcee7e6baad792c56c943356dd9ab8b46852a

Contents?: true

Size: 668 Bytes

Versions: 3

Compression:

Stored size: 668 Bytes

Contents

require 'spec_helper'

describe SCSSLint::Linter::HexValidation do
  context 'when rule is empty' do
    let(:css) { <<-CSS }
      p {
      }
    CSS

    it { should_not report_lint }
  end

  context 'when rule contains valid hex codes or color keyword' do
    let(:css) { <<-CSS }
      p {
        background: #000;
        color: #FFFFFF;
        border-color: red;
      }
    CSS

    it { should_not report_lint }
  end

  context 'when rule contains invalid hex codes' do
    let(:css) { <<-CSS }
      p {
        background: #dd;
        color: #dddd;
      }
    CSS

    it { should report_lint line: 2 }
    it { should report_lint line: 3 }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
scss-lint-0.26.2 spec/scss_lint/linter/hex_validation_spec.rb
scss-lint-0.26.1 spec/scss_lint/linter/hex_validation_spec.rb
scss-lint-0.26.0 spec/scss_lint/linter/hex_validation_spec.rb