Sha256: 28e5165cbfd62d2274c539d6f623496ee1b66bcdd7a9ce8ab87ea3e7f3ed3814

Contents?: true

Size: 1.44 KB

Versions: 10

Compression:

Stored size: 1.44 KB

Contents

require 'spec_helper'

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

    it { should_not report_lint }
  end

  context 'when a property' do
    context 'contains a normal border' do
      let(:css) { <<-CSS }
        p {
          border: 1px solid #000;
        }
      CSS

      it { should_not report_lint }
    end

    context 'has a border of 0' do
      let(:css) { <<-CSS }
        p {
          border: 0;
        }
      CSS

      it { should_not report_lint }
    end

    context 'has a border of none' do
      let(:css) { <<-CSS }
        p {
          border: none;
        }
      CSS

      it { should report_lint line: 2 }
    end

    context 'has a border-top of none' do
      let(:css) { <<-CSS }
        p {
          border-top: none;
        }
      CSS

      it { should report_lint line: 2 }
    end

    context 'has a border-right of none' do
      let(:css) { <<-CSS }
        p {
          border-right: none;
        }
      CSS

      it { should report_lint line: 2 }
    end

    context 'has a border-bottom of none' do
      let(:css) { <<-CSS }
        p {
          border-bottom: none;
        }
      CSS

      it { should report_lint line: 2 }
    end

    context 'has a border-left of none' do
      let(:css) { <<-CSS }
        p {
          border-left: none;
        }
      CSS

      it { should report_lint line: 2 }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
scss-lint-0.33.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.32.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.31.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.30.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.29.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.28.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.27.0 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.26.2 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.26.1 spec/scss_lint/linter/border_zero_spec.rb
scss-lint-0.26.0 spec/scss_lint/linter/border_zero_spec.rb