Sha256: 295a79bbfbeeefb161924119c4d7d4f47a061d1618643fc3f2868911d32c2801
Contents?: true
Size: 669 Bytes
Versions: 4
Compression:
Stored size: 669 Bytes
Contents
# require 'cover_me' require 'pathname' require 'tempfile' module SpecHelper def root @root_path ||= Pathname.new(File.expand_path('../../', __FILE__)) end def support root.join('spec', 'support') end module_function :root, :support end Dir["#{SpecHelper.support}/**/*.rb"].each do |f| require f end RSpec.configure do |config| config.mock_with :rspec end module Kernel def capture_stdout_descriptor Tempfile.open("spec") do |file| begin out = $stdout.dup $stdout.reopen(file) yield $stdout.flush return File.read(file) ensure $stdout.reopen(out) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ruby-perl-04.01.2011.2 | spec/spec_helper.rb |
ruby-perl-04.01.2011.1 | spec/spec_helper.rb |
ruby-perl-04.01.2011 | spec/spec_helper.rb |
ruby-perl-0.99.15j | spec/spec_helper.rb |