Sha256: 5ee21a8c2ea05b78385997000a142da3305805d0072e3b4928a2813b68620a89

Contents?: true

Size: 575 Bytes

Versions: 63

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

require_relative "test_helper"

module SassC
  class ErrorTest < MiniTest::Test
    def render(data, opts={})
      Engine.new(data, opts).render
    end

    def test_first_backtrace_is_sass
      filename = "app/assets/stylesheets/application.scss"

      begin
        template = <<-SCSS
.foo {
  baz: bang;
  padding top: 10px;
}
      SCSS

        render(template, filename: filename)
      rescue SassC::SyntaxError => err
        expected = "#{filename}:3"
        assert_equal expected, err.backtrace.first
      end
    end
  end
end

Version data entries

63 entries across 47 versions & 6 rubygems

Version Path
sassc-2.1.0.pre1 test/error_test.rb
sassc-2.0.1 test/error_test.rb
sassc-2.0.0 test/error_test.rb