Sha256: 8dd215989f2b74abea00dc12e3bdb287fed7cabc9a75a8e7bb02afc298428aa7

Contents?: true

Size: 474 Bytes

Versions: 131

Compression:

Stored size: 474 Bytes

Contents

# 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
module Spork::CustomIOStreams
  def self.included(klass)
    klass.send(:extend, ::Spork::CustomIOStreams::ClassMethods)
  end
  
  def stderr
    self.class.stderr
  end

  def stdout
    self.class.stdout
  end
  
  module ClassMethods
    def stderr
      $stderr
    end
  
    def stdout
      $stdout
    end
  end
end

Version data entries

131 entries across 131 versions & 12 rubygems

Version Path
panjiva-spork-0.8.6 lib/spork/custom_io_streams.rb
panjiva-spork-0.8.5.1 lib/spork/custom_io_streams.rb
panjiva-spork-0.8.5 lib/spork/custom_io_streams.rb
classiccms-0.7.5 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
classiccms-0.7.4 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
classiccms-0.7.3 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
bmabey-spork-0.5.9 lib/spork/custom_io_streams.rb
smtlaissezfaire-spork-0.5.7 lib/spork/custom_io_streams.rb
timcharper-spork-0.5.10 lib/spork/custom_io_streams.rb
timcharper-spork-0.5.7 lib/spork/custom_io_streams.rb
timcharper-spork-0.5.8 lib/spork/custom_io_streams.rb
timcharper-spork-0.5.9 lib/spork/custom_io_streams.rb
timcharper-spork-0.6.0 lib/spork/custom_io_streams.rb
timcharper-spork-0.6.1 lib/spork/custom_io_streams.rb
timcharper-spork-0.6.2 lib/spork/custom_io_streams.rb
timcharper-spork-0.6.3 lib/spork/custom_io_streams.rb
spork-1.0.0rc4 lib/spork/custom_io_streams.rb
spork-1.0.0rc4-x86-mswin32 lib/spork/custom_io_streams.rb
spork-1.0.0rc4-x86-mingw32 lib/spork/custom_io_streams.rb
classiccms-0.7.2 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb