Module: RSpec::Matchers::BuiltIn::CaptureStderr
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/output.rb
Class Method Summary collapse
Class Method Details
.capture(block) ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/output.rb', line 164 def self.capture(block) captured_stream = StringIO.new original_stream = $stderr $stderr = captured_stream block.call captured_stream.string ensure $stderr = original_stream end |
.name ⇒ Object
160 161 162 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/output.rb', line 160 def self.name 'stderr' end |