Sha256: 8b8a68650e0ec69ccef6593f04bdfeb235914d67e5915f325465d628e8bb6cb3

Contents?: true

Size: 571 Bytes

Versions: 109

Compression:

Stored size: 571 Bytes

Contents

require 'puma/null_io'
require 'test/unit'

class TestNullIO < Test::Unit::TestCase
  attr_accessor :nio
  def setup
    self.nio = Puma::NullIO.new
  end

  def test_read_with_no_arguments
    assert_equal "", nio.read
  end

  def test_read_with_nil_length
    assert_equal "", nio.read(nil)
  end

  def test_read_with_zero_length
    assert_equal "", nio.read(0)
  end

  def test_read_with_positive_integer_length
    assert_nil nio.read(1)
  end

  def test_read_with_length_and_buffer
    buf = ""
    assert_nil nio.read(1,buf)
    assert_equal "", buf
  end
end

Version data entries

109 entries across 109 versions & 5 rubygems

Version Path
puma-2.0.0.b7-java test/test_null_io.rb
puma-2.0.0.b7 test/test_null_io.rb
puma-2.0.0.b6 test/test_null_io.rb
puma-2.0.0.b5 test/test_null_io.rb
puma-2.0.0.b4-java test/test_null_io.rb
puma-2.0.0.b4 test/test_null_io.rb
puma-2.0.0.b3-java test/test_null_io.rb
puma-2.0.0.b3 test/test_null_io.rb
puma-2.0.0.b2-java test/test_null_io.rb
puma-2.0.0.b2 test/test_null_io.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/puma-1.6.3/test/test_null_io.rb
puma-2.0.0.b1-java test/test_null_io.rb
puma-2.0.0.b1 test/test_null_io.rb
puma-1.6.3-java test/test_null_io.rb
puma-1.6.3 test/test_null_io.rb
puma-1.6.2-java test/test_null_io.rb
puma-1.6.2 test/test_null_io.rb
puma-1.6.1-java test/test_null_io.rb
puma-1.6.1 test/test_null_io.rb
puma-1.6.0-java test/test_null_io.rb