crystal.spec_helper.mustache Maven / Gradle / Ivy
# {{#lambdaPrefixWithHash}}{{> api_info}}{{/lambdaPrefixWithHash}}
# load modules
require "spec"
require "json"
require "../src/{{{shardName}}}"
def assert_compilation_error(path : String, message : String) : Nil
buffer = IO::Memory.new
result = Process.run("crystal", ["run", "--no-color", "--no-codegen", path], error: buffer)
result.success?.should be_false
buffer.to_s.should contain message
buffer.close
end