Sha256: 5f8442727193bf090c7d7dbd7067adb8789402017cbe3f6fe5bacf40c9517d2d
Contents?: true
Size: 303 Bytes
Versions: 2
Compression:
Stored size: 303 Bytes
Contents
# encoding: utf-8 RSpec.configure do |config| def capture_stdout $stdout = StringIO.new yield if block_given? $stdout.string rescue "" ensure $stdout = STDOUT end config.around :each, :capture do |example| capture_stdout { example.run } end end # RSpec.configure
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hexx-rspec-0.5.2 | lib/hexx-rspec/initializers/capture.rb |
hexx-rspec-0.5.1 | lib/hexx-rspec/initializers/capture.rb |