Sha256: 76cc452266e05078cf6d3d3ebd0c2e70cada2dca2224313695e5740844046549

Contents?: true

Size: 783 Bytes

Versions: 3

Compression:

Stored size: 783 Bytes

Contents

require 'spec_helper'

describe LintTrap::Parser::CSSLint do
  let(:parser_output) do
    'bad.css: line 2, col 5, Error - Using width with border can sometimes'\
    " make elements larger than you expect.\n\n"
  end
  let(:io){StringIO.new(parser_output)}
  let(:container){LintTrap::Container::Fake.new}
  subject(:parser){described_class.new(io, container)}

  describe '.parse' do
    it 'parses violations from io' do
      expect{|b| @result = parser.parse(&b)}.to yield_successive_args(
        file: 'bad.css',
        line: '2',
        column: '5',
        length: nil,
        rule: nil,
        severity: 'Error',
        message: 'Using width with border can sometimes make elements larger than you expect.'
      )

      expect(@result).to eq("\n")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lint_trap-0.0.15 spec/parser/csslint_spec.rb
lint_trap-0.0.14 spec/parser/csslint_spec.rb
lint_trap-0.0.13 spec/parser/csslint_spec.rb