Sha256: ffc2fee3211835ed5db6d9329e3994f4740c3a3a265ad980636598edb70b3eef

Contents?: true

Size: 474 Bytes

Versions: 5

Compression:

Stored size: 474 Bytes

Contents

$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rubygems'

require 'work_bench'
require 'rspec'
require 'stringio'

RSpec.configure do |config|

  config.before :each do
    ARGV.replace []
  end

  def capture(stream)
    begin
      stream = stream.to_s
      eval "$#{stream} = StringIO.new"
      yield
      result = eval("$#{stream}").string
    ensure
      eval("$#{stream} = #{stream.upcase}")
    end
    result
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
work-bench-1.0.12 spec/spec_helper.rb
work-bench-1.0.11 spec/spec_helper.rb
work-bench-1.0.10 spec/spec_helper.rb
work-bench-1.0.9 spec/spec_helper.rb
work-bench-1.0.8 spec/spec_helper.rb