Sha256: 78d118db5141b9d5741ae691fab6c8e86faa601299911fda9ba3009c3c3fd229

Contents?: true

Size: 960 Bytes

Versions: 5

Compression:

Stored size: 960 Bytes

Contents

require 'spec_helper'

describe LintTrap::Linter::SCSSLint do
  let(:container){LintTrap::Container::Docker.new('lintci/spin_cycle:latest', fixture_path)}
  let(:options){{}}
  subject(:linter){described_class.new}

  describe '#lint' do
    context 'when linting a bad file' do
      let(:file){fixture_path('bad.scss')}

      it 'generates lint' do
        expect{|b| linter.lint([file], container, options, &b)}.to yield_successive_args(
          {
            file: file,
            line: '2',
            column: '3',
            length: '12',
            rule: 'BorderZero',
            severity: 'warning',
            message: '`border: 0;` is preferred over `border: none;`'
          }
        )
      end
    end

    context 'when linting a good file' do
      let(:file){fixture_path('good.scss')}

      it 'generates no lint' do
        expect{|b| linter.lint([file], container, options, &b)}.to_not yield_control
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lint_trap-0.0.11 spec/integration/scsslint_spec.rb
lint_trap-0.0.10 spec/integration/scsslint_spec.rb
lint_trap-0.0.9 spec/integration/scsslint_spec.rb
lint_trap-0.0.8 spec/integration/scsslint_spec.rb
lint_trap-0.0.7 spec/integration/scsslint_spec.rb