Skip to content
Browse files

make tests pass under travis.

sudo tests were failing under travis because they were not
being run as root.  this change runs the root tests as root,
and chowns the tests' "tmp" directory back to the original
user to allow the subsequent 'realworld' tests to pass.
  • Loading branch information...
1 parent 5799ae8 commit 270016c2ccd5c9ecadc77c7859c386a364dfb033 @echohead echohead committed with indirect
Showing with 6 additions and 1 deletion.
  1. +6 −1 Rakefile
7 Rakefile
@@ -11,6 +11,10 @@ rescue
+def sudo_task(task)
+ system("sudo -E rake #{task}")
namespace :spec do
desc "Ensure spec dependencies are installed"
task :deps do
@@ -116,7 +120,8 @@ begin
puts "\n\e[1;33m[Travis CI] Running bundler sudo specs against rubygems #{rg}\e[m\n\n"
- sudos = safe_task { Rake::Task["spec:rubygems:#{rg}:sudo"].invoke }
+ sudos = sudo_task "spec:rubygems:#{rg}:sudo"
+ chown = system("sudo chown -R #{ENV['USER']} #{File.join(File.dirname(__FILE__), 'tmp')}")

0 comments on commit 270016c

Please sign in to comment.
Something went wrong with that request. Please try again.