Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
compiler_spec.cr 358 B
Newer Older
Ary Borenszweig's avatar
Ary Borenszweig committed
require "tempfile"
Ary Borenszweig's avatar
Ary Borenszweig committed
  it "compiles a file" do
    tempfile = Tempfile.new "compiler_spec_output"
    tempfile.close
    Crystal::Command.run ["build", "#{__DIR__}/data/compiler_sample", "-o", tempfile.path]
Ary Borenszweig's avatar
Ary Borenszweig committed
    File.exists?(tempfile.path).should be_true
Ary Borenszweig's avatar
Ary Borenszweig committed
    `#{tempfile.path}`.should eq("Hello!")