Sha256: 848a3f01601dacd5d9129480bd10cafcdd881bfde204c514585a599330eacf92

Contents?: true

Size: 783 Bytes

Versions: 4

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}

  describe '.parse' do
    it 'parses violations from io' do
      expect{|b| @result = parser.parse(io, container, &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

4 entries across 4 versions & 1 rubygems

Version Path
lint_trap-0.0.19 spec/parser/csslint_spec.rb
lint_trap-0.0.18 spec/parser/csslint_spec.rb
lint_trap-0.0.17 spec/parser/csslint_spec.rb
lint_trap-0.0.16 spec/parser/csslint_spec.rb