Sha256: c466744d2a1fa06fb11fd7b9290d8121141ac53281aa1b7397d5d4bb270ea7a0

Contents?: true

Size: 634 Bytes

Versions: 5

Compression:

Stored size: 634 Bytes

Contents

require File.expand_path('spec/helper')
require "Bacon_Colored"
require 'Checked'


FOLDER = ("/tmp/Checked_Test")
%x! mkdir -p #{FOLDER}!
at_exit {
  %x! rm -rf #{FOLDER} !
}

def ruby_e cmd
  file = "#{FOLDER}/delete_me_perf_#{rand(100000)}.rb"
  begin
    loader = File.expand_path( File.dirname(__FILE__) + '/../lib' )
    File.open(file, 'w') { |io|
      io.write %~
      $LOAD_PATH.unshift('#{loader}')
      #{cmd}
    ~
    }
  %x[ bundle exec ruby #{file} 2>&1].strip
  ensure
    File.delete file
  end
end


Dir.glob('spec/tests/*.rb').each { |file|
  require File.expand_path(file.sub('.rb', '')) if File.file?(file)
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
Checked-0.1.4 spec/main.rb
Checked-0.1.3 spec/main.rb
Checked-0.1.2 spec/main.rb
Checked-0.1.1 spec/main.rb
Checked-0.1.0 spec/main.rb