~tim/scheme-vm

d7925c66064686d31d2050fe9e02ed61ef8d1b22 — Tim Morgan 5 years ago d0069d6
Improve error shown when scheme spec fails
1 files changed, 6 insertions(+), 2 deletions(-)

M spec/lib_spec.rb
M spec/lib_spec.rb => spec/lib_spec.rb +6 -2
@@ 6,9 6,13 @@ describe 'Libs' do

  it 'passes all tests' do
    Dir[File.expand_path('../lib/**/*.scm', __FILE__)].each do |path|
      Program.new(File.read(path), stdout: out).run
      Program.new(File.read(path), filename: File.split(path).last, stdout: out).run
      out.rewind
      expect(out.read).to eq('')
      result = out.read
      if result != ''
        puts result
        fail 'spec failed'
      end
    end
  end
end