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
classiccms-0.3.0 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
spork-0.9.2 lib/spork/custom_io_streams.rb
classiccms-0.2.4.pre vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
spork-0.9.1 lib/spork/custom_io_streams.rb
spork-1.0.0rc3 lib/spork/custom_io_streams.rb
classicCMS-0.2.3 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
classicCMS-0.2.2 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
classicCMS-0.2.1 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
classicCMS-0.2.0 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
classicCMS-0.1.2 vendor/bundle/gems/spork-0.9.0/lib/spork/custom_io_streams.rb
spork-1.0.0rc2 lib/spork/custom_io_streams.rb
spork-1.0.0rc2-x86-mswin32 lib/spork/custom_io_streams.rb
spork-1.0.0rc2-x86-mingw32 lib/spork/custom_io_streams.rb
spork-1.0.0rc1 lib/spork/custom_io_streams.rb
spork-1.0.0rc1-x86-mswin32 lib/spork/custom_io_streams.rb
spork-1.0.0rc1-x86-mingw32 lib/spork/custom_io_streams.rb
spork-1.0.0rc0-x86-mswin32 lib/spork/custom_io_streams.rb
spork-1.0.0rc0-x86-mingw32 lib/spork/custom_io_streams.rb
spork-0.9.0-x86-mswin32 lib/spork/custom_io_streams.rb
spork-0.9.0-x86-mingw32 lib/spork/custom_io_streams.rb