Sha256: b8c3bb54adcbd4a2c9fd8a713f9c191f406ff5ad553617902e12514060e205c2
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
require 'rubygems' require 'bundler/setup' Bundler.setup require 'obo_parser' require 'pry' require 'awesome_print' require 'fileutils' require "stringio" # FileUtils::mkdir_p 'tmp' RSpec.configure do |config| config.raise_errors_for_deprecations! config.run_all_when_everything_filtered = false # config.filter_run :focus # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 # config.order = 'random' end # def in_range(value, percentage, midpoint) #order of second and third params to be consistent with be_within # # value is a scalar for testing against the range, percentage is a float less than 1, midpoint is the nominal center of the range # return (value <= midpoint*(1.0 + percentage)) & (value >= midpoint*(1.0 - percentage)) # end # https://stackoverflow.com/questions/4459330/how-do-i-temporarily-redirect-stderr-in-ruby def capture_stderr previous_stdout, $stdout = $stdout, StringIO.new yield $stdout.string ensure $stdout = previous_stdout end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
obo_parser-0.4.2 | spec/spec_helper.rb |
obo_parser-0.4.1 | spec/spec_helper.rb |