Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Appease URLClassLoader which requires directories to end in slashes
- Loading branch information
1 parent
9cf97c3
commit 8740a6b
Showing
2 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require File.dirname(__FILE__) + "/../spec_helper" | ||
|
||
require 'java' | ||
|
||
describe "The $CLASSPATH variable" do | ||
it "appends URLs unmodified" do | ||
$CLASSPATH << "http://jruby.org/" | ||
$CLASSPATH.should include("http://jruby.org/") | ||
end | ||
|
||
it "assumes entries without URL protocols are files" do | ||
$CLASSPATH << __FILE__ | ||
$CLASSPATH.should include("file:#{__FILE__}") | ||
end | ||
|
||
it "appends slashes to directory names" do | ||
d = File.expand_path(File.dirname(__FILE__)) | ||
$CLASSPATH << d | ||
$CLASSPATH.should include("file:#{d}/") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters