Actions
Bug #14228
closedrunning single test fails due to FileUtils not being required
Description
Actions
Added by Tom Caspy over 10 years ago. Updated about 8 years ago.
Description
What's the stack trace, command/output?
when running ruby -Itest test/unit/lookup_key_test.rb:
/home/orabin/foreman/test/test_helper.rb:12:in `block in <top (required)>': uninitialized constant FileUtils (NameError) from /home/orabin/.rvm/gems/ruby-2.2.3@foreman/gems/spork-1.0.0rc4/lib/spork.rb:24:in `prefork' from /home/orabin/foreman/test/test_helper.rb:4:in `<top (required)>' from /home/orabin/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /home/orabin/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from test/unit/lookup_key_test.rb:1:in `<main>'
Thanks, I see it now. I usually use "bundle exec" and Bundler loads FileUtils, so don't see this error (probably the same for rake too).
It happens any time log/test.log exists after a test run - may not be related to #14097. Deleting the file first works around it too.
Applied in changeset 86aa4085af9f5a2b9a8ef6207022f0781bc0d48e.