[Ironruby-core] tests\ironruby\Builtin\test_dir.rb

Peter Bacon Darwin bacondarwin at googlemail.com
Thu May 15 09:12:04 EDT 2008

I don't know if this file is obsolete yet but currently it gets executed if
you do rake test.


The following test in this file fails if neither HOME or LOGDIR are set in
the environment:


describe "Dir#chdir" do 

    it "changes the current directory to HOME or LOGDIR if set" do 


        #should_raise(ArgumentError) { Dir.chdir } -- works correctly today




It looks like this used to raise the ArgumentError (correctly) but then
perhaps whoever was running the tests added in a HOME item to their
environment and it broke the test.


So really the test should check to see if the environment variable has been
set before calling Dir.chdir. But I expect that this test is going to be
very obsolete once the full RSpecs are up and running.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080515/87c4ff73/attachment.html>

More information about the Ironruby-core mailing list