Sha256: fae753a5bfe3a75544bfd2796677c30106b575886580c153126308252d8bb923
Contents?: true
Size: 1.4 KB
Versions: 15
Compression:
Stored size: 1.4 KB
Contents
require 'spec_helper' describe SCSSLint::Linter::PlaceholderInExtend do context 'when extending with a class' do let(:scss) { <<-SCSS } p { @extend .error; } SCSS it { should report_lint line: 2 } end context 'when extending with a type' do let(:scss) { <<-SCSS } p { @extend span; } SCSS it { should report_lint line: 2 } end context 'when extending with an id' do let(:scss) { <<-SCSS } p { @extend #some-identifer; } SCSS it { should report_lint line: 2 } end context 'when extending with a comma sequence starting with a placeholder' do let(:scss) { <<-SCSS } p { @extend %placeholder, .item; } SCSS it { should report_lint line: 2 } end context 'when extending with a placeholder' do let(:scss) { <<-SCSS } p { @extend %placeholder; } SCSS it { should_not report_lint } end context 'when extending with a selector whose prefix is not a placeholder' do let(:scss) { <<-SCSS } p { @extend .blah-\#{$dynamically_generated_name}; } SCSS it { should report_lint line: 2 } end context 'when extending with a selector whose prefix is dynamic' do let(:scss) { <<-SCSS } p { @extend \#{$dynamically_generated_placeholder_name}; } SCSS it { should_not report_lint } end end
Version data entries
15 entries across 15 versions & 1 rubygems