Sha256: 12a322ea35f15628923f65df902715385d6c05c85480c16dee0049a469cb5181

Contents?: true

Size: 858 Bytes

Versions: 4

Compression:

Stored size: 858 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require 'rbconfig'
require_relative '../../app/run'

class TestAppRun < Test::Unit::TestCase
  include Trepanning
  def test_whence
    resolved_file = whence_file('irb')
    if RbConfig::CONFIG['target_os'].start_with?('mingw')
      assert_equal(true, File.readable?(resolved_file),
                   "file #{resolved_file} should be readable")
    else
      assert_equal(true, File.executable?(resolved_file),
                   "file #{resolved_file} should be executable")
    end
    ng = whence_file('probably-does-not-exist')
    assert_equal(true, File.executable?(ng) || ng == 'probably-does-not-exist')
  end

  def test_ruby_syntax_errors
    assert_nil ruby_syntax_errors __FILE__
    readme = File.join(File.dirname(__FILE__), %w(.. .. README.textile))
    assert ruby_syntax_errors(readme)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trepanning-2.15.35 test/unit/test-app-run.rb
trepanning-1.93.35 test/unit/test-app-run.rb
trepanning-2.15.33 test/unit/test-app-run.rb
trepanning-1.93.32 test/unit/test-app-run.rb