Sha256: 48f5f66802b532f3db1156f227577acca40ee35139b774d703491512a6a38e1c

Contents?: true

Size: 848 Bytes

Versions: 45

Compression:

Stored size: 848 Bytes

Contents

require File.expand_path('../helper', __FILE__)

class TestRakeRequire < Rake::TestCase

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

  def test_wont_reload_rake_library
    app = Rake::Application.new

    paths = ['test/data/rakelib']
    loaded_files = []
    app.rake_require("test2", paths, loaded_files)

    assert ! app.instance_eval {
      rake_require("test2", paths, loaded_files)
    }
  end

  def test_throws_error_if_library_not_found
    app = Rake::Application.new
    ex = assert_raises(LoadError) {
      assert app.instance_eval {
        rake_require("testx", ['test/data/rakelib'], [])
      }
    }
    assert_match(/(can *not|can't)\s+find/i, ex.message)
    assert_match(/testx/, ex.message)
  end
end

Version data entries

45 entries across 32 versions & 4 rubygems

Version Path
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.5 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.4 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.6.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.4 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.2 dirty_history/ruby/1.9.1/gems/dirty_history-0.2.0/dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.1 dirty_history/ruby/1.9.1/gems/dirty_history-0.2.0/dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.0 dirty_history/ruby/1.9.1/gems/dirty_history-0.2.0/dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb
dirty_history-0.5.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/test_rake_require.rb