diff options
author | Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2010-06-22 21:48:51 +0200 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-06-22 13:39:48 -0700 |
commit | 12f8359d96d2469cb5792345d6f4249428b626d6 (patch) | |
tree | bb071abd3eee19da2f4a07f0145ea048f67682b9 | |
parent | e1ee547fa9fdd013875792bc0ae5651f5ed7c663 (diff) | |
download | bundler-12f8359d96d2469cb5792345d6f4249428b626d6.tar.gz |
Avid failing the read-only test when running as root.
Root users in most operating systems ignore the read-only permissions
altogether; to avoid causing a failure if that's the case, simply mark the
test as pending if executing as uid == 0.
-rw-r--r-- | spec/runtime/environment_rb_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/runtime/environment_rb_spec.rb b/spec/runtime/environment_rb_spec.rb index 73a388c5c5..34417dc371 100644 --- a/spec/runtime/environment_rb_spec.rb +++ b/spec/runtime/environment_rb_spec.rb @@ -204,6 +204,11 @@ describe "environment.rb file" do end it "warns you if it's from an old bundler but read-only" do + if Process.euid == 0 + pending "this test cannot succeed as root" + return + end + env_file(env_file.read.gsub("by Bundler #{Bundler::VERSION}", "by Bundler 0.9.0")) FileUtils.chmod 0444, env_file ruby <<-R, :expect_err => true |