Shri Borde
2009-Jan-23 19:15 UTC
[Ironruby-core] Failure in library/ftools/makedirs_spec.rb
This test fails the second time I run it. I have to then manually delete the makedirs_test folder that is created. The test tries to do system("rmdir makedirs_test/second_dir"), but that fails since "/" is used. How come its not failing in Snap? What is a platform-independent way of deleting a folder hierarchy? c:\vsl\Merlin\External\Languages\IronRuby\mspec\rubyspec\library\ftools>runrspec -ruby ../library/ftools/makedirs_spec.rb c:\vsl\Merlin\External\Languages\IronRuby\mspec\rubyspec\library\ftools>pushd c:\vsl\Merlin\Main\..\External\Languages\IronRuby\mspec c:\vsl\Merlin\External\Languages\IronRuby\mspec>c:\vsl\Merlin\Main\..\External\Languages\Ruby\ruby-1.8.6\bin\ruby.exe mspec\bin\mspec-run -fd --verbose --config default.mspec rubyspec/core/../library/ftools/makedirs_spec.rb rubyspec/core/../library/ftools/makedirs_spec.rb Parameter format not correct - "second_dir". The directory is not empty. F 1) File.makedirs creates the dirs from arg FAILED Expected true to equal false ./rubyspec/core/../library/ftools/makedirs_spec.rb:14 ./rubyspec/core/../library/ftools/makedirs_spec.rb:2:in `all?'' ./rubyspec/core/../library/ftools/makedirs_spec.rb:4 mspec/bin/mspec-run:8 Finished in 0.082000 seconds 1 file, 1 example, 1 expectation, 1 failure, 0 errors Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090123/cc24a30c/attachment.html>
Jim Deville
2009-Jan-23 19:41 UTC
[Ironruby-core] Failure in library/ftools/makedirs_spec.rb
FileUtils.rm_rf("target") is a platform independent way. It is also ok, because FileUtils is used by MSpec itself. It doesn''t fail in SNAP because SNAP does a tfpt treeclean -delete between each run. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Friday, January 23, 2009 11:15 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Failure in library/ftools/makedirs_spec.rb This test fails the second time I run it. I have to then manually delete the makedirs_test folder that is created. The test tries to do system("rmdir makedirs_test/second_dir"), but that fails since "/" is used. How come its not failing in Snap? What is a platform-independent way of deleting a folder hierarchy? c:\vsl\Merlin\External\Languages\IronRuby\mspec\rubyspec\library\ftools>runrspec -ruby ../library/ftools/makedirs_spec.rb c:\vsl\Merlin\External\Languages\IronRuby\mspec\rubyspec\library\ftools>pushd c:\vsl\Merlin\Main\..\External\Languages\IronRuby\mspec c:\vsl\Merlin\External\Languages\IronRuby\mspec>c:\vsl\Merlin\Main\..\External\Languages\Ruby\ruby-1.8.6\bin\ruby.exe mspec\bin\mspec-run -fd --verbose --config default.mspec rubyspec/core/../library/ftools/makedirs_spec.rb rubyspec/core/../library/ftools/makedirs_spec.rb Parameter format not correct - "second_dir". The directory is not empty. F 1) File.makedirs creates the dirs from arg FAILED Expected true to equal false ./rubyspec/core/../library/ftools/makedirs_spec.rb:14 ./rubyspec/core/../library/ftools/makedirs_spec.rb:2:in `all?'' ./rubyspec/core/../library/ftools/makedirs_spec.rb:4 mspec/bin/mspec-run:8 Finished in 0.082000 seconds 1 file, 1 example, 1 expectation, 1 failure, 0 errors Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090123/7662668f/attachment.html>