Sha256: ac38b7306a30622dd2ed8a0b44e15bb768fb666fa9a549b8f3a053c363b69ea9
Contents?: true
Size: 597 Bytes
Versions: 9
Compression:
Stored size: 597 Bytes
Contents
require 'bundler/setup' Bundler.require require 'webmock/rspec' require 'pathname' require 'stringio' RSpec.configure do |config| 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 def base_dir Pathname('../..').expand_path(__FILE__) end def tmp_dir base_dir.join('tmp') end alias :silence :capture config.before(:all) do unless tmp_dir.directory? tmp_dir.mkdir end end end
Version data entries
9 entries across 9 versions & 1 rubygems