Sha256: 7fdd7dcc02f80baef8293744b4c099ac6e422ef16b7f74ea9d2b3514cfef715b

Contents?: true

Size: 529 Bytes

Versions: 33

Compression:

Stored size: 529 Bytes

Contents

require 'spec_helper'

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

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

    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(:scss) { "\xC0\u0001" }

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

Version data entries

33 entries across 33 versions & 3 rubygems

Version Path
scss_lint-0.55.0 spec/scss_lint/engine_spec.rb
scss_lint-0.54.0 spec/scss_lint/engine_spec.rb
scss_lint-0.53.0 spec/scss_lint/engine_spec.rb
scss_lint-0.52.0 spec/scss_lint/engine_spec.rb
scss_lint-0.51.0 spec/scss_lint/engine_spec.rb
scss_lint-0.50.3 spec/scss_lint/engine_spec.rb
scss_lint-0.50.2 spec/scss_lint/engine_spec.rb
scss_lint-0.50.1 spec/scss_lint/engine_spec.rb
scss_lint-0.50.0 spec/scss_lint/engine_spec.rb
scss_lint-0.49.0 spec/scss_lint/engine_spec.rb
scss_lint-0.48.0 spec/scss_lint/engine_spec.rb
scss_lint-0.47.1 spec/scss_lint/engine_spec.rb
scss_lint-0.47.0 spec/scss_lint/engine_spec.rb
scss_lint-0.46.0 spec/scss_lint/engine_spec.rb
scss_lint-0.45.0 spec/scss_lint/engine_spec.rb
scss_lint-0.44.0 spec/scss_lint/engine_spec.rb
scss_lint-0.43.2 spec/scss_lint/engine_spec.rb
scss_lint-0.43.1 spec/scss_lint/engine_spec.rb
scss_lint-0.43.0 spec/scss_lint/engine_spec.rb
scss_lint-0.42.2 spec/scss_lint/engine_spec.rb