Sha256: 6c177c0d2cff04f95f628090ad180b847b81f270d917bbb9458862f322f5ba4c

Contents?: true

Size: 683 Bytes

Versions: 2

Compression:

Stored size: 683 Bytes

Contents

#!/usr/bin/env ruby

require 'test/unit'
require 'rake'

# ====================================================================
class TestRequire < Test::Unit::TestCase

  def test_can_load_rake_library
    app = Rake::Application.new
    assert app.rake_require("test2", ['test/data/rakelib'], [])
  end

  def test_wont_reload_rake_library
    app = Rake::Application.new
    assert ! app.rake_require("test2", ['test/data/rakelib'], ['test2'])
  end

  def test_throws_error_if_library_not_found
    app = Rake::Application.new
    ex = assert_raise(LoadError) {
      assert app.rake_require("testx", ['test/data/rakelib'], [])
    }
    assert_match(/x/, ex.message)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rake-0.7.1 test/test_require.rb
rake-0.7.2 test/test_require.rb