Sha256: 598f6f5bf1424043eddf3400cfc82ae158fdc39be79f245181c357cfd817548c

Contents?: true

Size: 518 Bytes

Versions: 10

Compression:

Stored size: 518 Bytes

Contents

require 'spec_helper'

describe SCSSLint::Engine do
  let(:engine) { described_class.new(css) }

  context 'when a @media directive is present' do
    let(:css) { <<-CSS }
      @media only screen {
      }
    CSS

    it 'has a parse tree' do
      engine.tree.should_not be_nil
    end
  end

  context 'when the file being linted has an invalid byte sequence' do
    let(:css) { "\xC0\u0001" }

    it 'raises a SyntaxError' do
      expect { engine }.to raise_error(SCSSLint::FileEncodingError)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
scss-lint-0.33.0 spec/scss_lint/engine_spec.rb
scss-lint-0.32.0 spec/scss_lint/engine_spec.rb
scss-lint-0.31.0 spec/scss_lint/engine_spec.rb
scss-lint-0.30.0 spec/scss_lint/engine_spec.rb
scss-lint-0.29.0 spec/scss_lint/engine_spec.rb
scss-lint-0.28.0 spec/scss_lint/engine_spec.rb
scss-lint-0.27.0 spec/scss_lint/engine_spec.rb
scss-lint-0.26.2 spec/scss_lint/engine_spec.rb
scss-lint-0.26.1 spec/scss_lint/engine_spec.rb
scss-lint-0.26.0 spec/scss_lint/engine_spec.rb