Ruby Forum IronRuby > tests\ironruby\Builtin\test_dir.rb

Posted by Peter Bacon Darwin (Guest)
on 15.05.2008 15:13
(Received via mailing list)
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

      Dir.chdir

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

    end

   ...



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.



Pete
Posted by John Lam (IRONRUBY) (Guest)
on 15.05.2008 16:03
(Received via mailing list)
Peter Bacon Darwin:

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

Hi Pete,

Yep - this is a known issue. I have a shelveset that fixes this and some 
other bugs in the specs going through SNAP now. We're hoping to make the 
move soon to Ruby Specs - ETA should be today since the most recent big 
change just got checked in last night (will push out soon).

Thanks,
-John