Module: Spork::CustomIOStreams

Included in:
Server
Defined in:
lib/spork/custom_io_streams.rb

Overview

This class is mainly used for testing. When included (and used), it gives us an opportunity to stub out the output streams used for a given class

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



4
5
6
# File 'lib/spork/custom_io_streams.rb', line 4

def self.included(klass)
  klass.send(:extend, ::Spork::CustomIOStreams::ClassMethods)
end

Instance Method Details

#stderrObject



8
9
10
# File 'lib/spork/custom_io_streams.rb', line 8

def stderr
  self.class.stderr
end

#stdoutObject



12
13
14
# File 'lib/spork/custom_io_streams.rb', line 12

def stdout
  self.class.stdout
end