~tim/scheme-vm

625ec6f80ea3eaf28e1fc13b5c4618fbd989f047 — Tim Morgan 2 years ago 7a14736
Improve lib spec failure message
1 files changed, 1 insertions(+), 7 deletions(-)

M spec/lib_spec.rb
M spec/lib_spec.rb => spec/lib_spec.rb +1 -7
@@ 14,7 14,6 @@ Dir[File.expand_path('../lib/**/*.scm', __FILE__)].each do |path|
    skip = !(code =~ /^;; skip/).nil?
    debug = code =~ /^;; debug/ ? 2 : 0
    it 'passes all tests', focus: focus, skip: skip do
      failed = false
      out = DumpableStringIO.new
      program = Marshal.load(cached_program)
      program.filename = path


@@ 22,12 21,7 @@ Dir[File.expand_path('../lib/**/*.scm', __FILE__)].each do |path|
      program.run(code: code, debug: debug)
      out.rewind
      result = out.read
      if result != ''
        puts
        puts result
        failed = true
      end
      raise 'spec failed' if failed
      raise result unless result == ''
    end
  end
end