Skip to content

Commit

Permalink
Add test for another edge case in PrivateNamingConvention
Browse files Browse the repository at this point in the history
I was trying out this new rule in a few more places, and noticed
similarly broken behavior when the file starts with an @import
statement. My previous fix also resolves this, but I think it is good to
cover this with a test anyway.
  • Loading branch information
lencioni committed Feb 23, 2016
1 parent 55047bb commit 420785e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/scss_lint/linter/private_naming_convention_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@
it { should_not report_lint }
end

context 'is defined and used in the same file that starts with an @import' do
let(:scss) { <<-SCSS }
@import 'bar';
$_foo: red;
p {
color: $_foo;
}
SCSS

it { should_not report_lint }
end

context 'is defined and used in a for loop when the file begins with a comment' do
let(:scss) { <<-SCSS }
// A comment
Expand Down

0 comments on commit 420785e

Please sign in to comment.