Sha256: 786b183f9c1b3428b7be78052262a4a3c0283b7ce5c0dd9f3c9a4b4eb3417b8f

Contents?: true

Size: 998 Bytes

Versions: 19

Compression:

Stored size: 998 Bytes

Contents

#!/usr/bin/env ruby

$VERBOSE = true

$: << "../lib"

require 'test/unit'
require 'zip/ziprequire'

$: << 'data/rubycode.zip' << 'data/rubycode2.zip'

class ZipRequireTest < Test::Unit::TestCase
  def test_require
    assert(require('data/notzippedruby'))
    assert(!require('data/notzippedruby'))

    assert(require('zippedruby1'))
    assert(!require('zippedruby1'))

    assert(require('zippedruby2'))
    assert(!require('zippedruby2'))

    assert(require('zippedruby3'))
    assert(!require('zippedruby3'))

    c1 = NotZippedRuby.new
    assert(c1.returnTrue)
    assert(ZippedRuby1.returnTrue)
    assert(!ZippedRuby2.returnFalse)
    assert_equal(4, ZippedRuby3.multiplyValues(2, 2))
  end

  def test_get_resource
    get_resource("aResource.txt") {
      |f|
      assert_equal("Nothing exciting in this file!", f.read)
    }
  end
end

# Copyright (C) 2002 Thomas Sondergaard
# rubyzip is free software; you can redistribute it and/or
# modify it under the terms of the ruby license.

Version data entries

19 entries across 19 versions & 11 rubygems

Version Path
IronDigital-rubyzip-0.9.2 test/ziprequiretest.rb
agraham-rubyzip-0.9.1 test/ziprequiretest.rb
erawk-rubyzip-0.9.1 test/ziprequiretest.rb
erawk-rubyzip-0.9.2 test/ziprequiretest.rb
expectedbehavior-rubyzip-0.9.1.2 test/ziprequiretest.rb
febeling-rubyzip-0.9.2 test/ziprequiretest.rb
mksm-rubyzip-0.9.3 test/ziprequiretest.rb
rubyzip2-2.0.2 test/ziprequiretest.rb
rzip-2.1.1 test/test_ziprequire.rb
zip-2.0.2 test/ziprequiretest.rb
rubyzip-0.9.4 test/ziprequiretest.rb
viva-rubyzip-0.9.1.2 test/ziprequiretest.rb
viva-rubyzip-0.9.1.1 test/ziprequiretest.rb
rubyzip-0.5.8 test/ziprequiretest.rb
rubyzip-0.5.7 test/ziprequiretest.rb
rubyzip-0.5.9 test/ziprequiretest.rb
rubyzip-0.5.11 test/ziprequiretest.rb
rubyzip-0.5.12 test/ziprequiretest.rb
rubyzip-0.9.1 test/ziprequiretest.rb