Sha256: ed86b2db2010cfefe4062c2bae095d59746e7477b795f211ce6185dee2dbb1b6

Contents?: true

Size: 285 Bytes

Versions: 20

Compression:

Stored size: 285 Bytes

Contents

module SpecHelper
  def tmpdir
    TMPDIR
  end

  def capture(stream)
    begin
      stream = stream.to_s
      eval "$#{stream} = StringIO.new"
      yield
      result = eval("$#{stream}").string
    ensure
      eval("$#{stream} = #{stream.upcase}")
    end

    result
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
kitabu-2.1.0 spec/support/helper.rb
kitabu-2.0.4 spec/support/helper.rb
kitabu-2.0.3 spec/support/helper.rb
kitabu-2.0.2 spec/support/helper.rb
kitabu-2.0.1 spec/support/helper.rb
kitabu-2.0.0 spec/support/helper.rb
kitabu-1.0.6 spec/support/helper.rb
kitabu-1.0.5 spec/support/helper.rb
tacape-0.0.6 spec/support/helper.rb
tacape-0.0.4 spec/support/helper.rb
tacape-0.0.3 spec/support/helper.rb
kitabu-1.0.4 spec/support/helper.rb
kitabu-1.0.3 spec/support/helper.rb
kitabu-1.0.2 spec/support/helper.rb
kitabu-1.0.1 spec/support/helper.rb
kitabu-1.0.0 spec/support/helper.rb
kitabu-1.0.0.rc4 spec/support/helper.rb
kitabu-1.0.0.rc3 spec/support/helper.rb
kitabu-1.0.0.rc2 spec/support/helper.rb
kitabu-1.0.0.rc1 spec/support/helper.rb