Sha256: cfd4fc220b9d81646f8e97d705dedd007043c52759fc8b7b017753dbe89f9899
Contents?: true
Size: 1.59 KB
Versions: 6
Compression:
Stored size: 1.59 KB
Contents
require 'spec_helper' describe SCSSLint::Linter::DeclarationOrder do context 'when rule is empty' do let(:css) { <<-CSS } p { } CSS it { should_not report_lint } end context 'when rule contains only properties' do let(:css) { <<-CSS } p { background: #000; margin: 5px; } CSS it { should_not report_lint } end context 'when rule contains only mixins' do let(:css) { <<-CSS } p { @include border-radius(5px); @include box-shadow(5px); } CSS it { should_not report_lint } end context 'when rule contains no mixins or properties' do let(:css) { <<-CSS } p { a { color: #f00; } } CSS it { should_not report_lint } end context 'when rule contains properties after nested rules' do let(:css) { <<-CSS } p { a { color: #f00; } color: #f00; margin: 5px; } CSS it { should report_lint } end context 'when @extend appears before any properties or rules' do let(:css) { <<-CSS } .warn { font-weight: bold; } .error { @extend .warn; color: #f00; a { color: #ccc; } } CSS it { should_not report_lint } end context 'when @extend appears after a property' do let(:css) { <<-CSS } .warn { font-weight: bold; } .error { color: #f00; @extend .warn; a { color: #ccc; } } CSS it { should report_lint } end end
Version data entries
6 entries across 6 versions & 1 rubygems