Sha256: 755bce50168185878359a3f2801e644a7d6ebe349f8b648d7e193df5a93f36ac

Contents?: true

Size: 403 Bytes

Versions: 34

Compression:

Stored size: 403 Bytes

Contents

# Copied from cruby and modified to skip unsupported syntaxes
require 'test/unit'
require 'nodejs'
require 'nodejs/io'

class TestNodejsIO < Test::Unit::TestCase

  def test_binread
    File.write('tmp/foo', 'bar')
    assert_equal("bar", IO.binread('tmp/foo'))
  end

  def test_binread_noexistent_should_raise_io_error
    assert_raise IOError do
      IO.binread('tmp/nonexistent')
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 test/nodejs/test_io.rb
opal-1.8.2 test/nodejs/test_io.rb
opal-1.8.1 test/nodejs/test_io.rb
opal-1.8.0 test/nodejs/test_io.rb
opal-1.8.0.beta1 test/nodejs/test_io.rb
opal-1.7.4 test/nodejs/test_io.rb
opal-1.8.0.alpha1 test/nodejs/test_io.rb
opal-1.7.3 test/nodejs/test_io.rb
opal-1.7.2 test/nodejs/test_io.rb
opal-1.7.1 test/nodejs/test_io.rb
opal-1.7.0 test/nodejs/test_io.rb
opal-1.7.0.rc1 test/nodejs/test_io.rb
opal-1.6.1 test/nodejs/test_io.rb
opal-1.6.0 test/nodejs/test_io.rb
opal-1.6.0.rc1 test/nodejs/test_io.rb
opal-1.6.0.alpha1 test/nodejs/test_io.rb
opal-1.5.1 test/nodejs/test_io.rb
opal-1.5.0 test/nodejs/test_io.rb
opal-1.5.0.rc1 test/nodejs/test_io.rb
opal-1.4.1 test/nodejs/test_io.rb