Skip to content

Commit

Permalink
Spec for Kernel.load on 1.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Oct 7, 2011
1 parent b532b6e commit 60ece53
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/kernel/shared/load.rb
Expand Up @@ -20,6 +20,15 @@
ScratchPad.recorded.should == [:no_rb_ext]
end

ruby_version_is "1.9" do
it "loads from the current working directory" do
Dir.chdir CODE_LOADING_DIR do
@object.load("load_fixture.rb").should be_true
ScratchPad.recorded.should == [:loaded]
end
end
end

it "loads a file that recursively requires itself" do
path = File.expand_path "recursive_require_fixture.rb", CODE_LOADING_DIR
@object.load(path).should be_true
Expand Down

0 comments on commit 60ece53

Please sign in to comment.