Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid warnings about ()

  • Loading branch information...
commit 1ed75ec29034ac60ac27cfdd1d96d7d8942fa046 1 parent c3ed110
Eric Hodel drbrain authored
Showing with 9 additions and 5 deletions.
  1. +9 −5 test/rubygems/test_gem_installer.rb
14 test/rubygems/test_gem_installer.rb
View
@@ -181,7 +181,7 @@ def test_generate_bin_bindir
assert_equal true, File.directory?(util_inst_bindir)
installed_exec = File.join(util_inst_bindir, 'executable')
assert_equal true, File.exist?(installed_exec)
- assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+ assert_equal mask, File.stat(installed_exec).mode unless win_platform?
wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
@@ -196,7 +196,7 @@ def test_generate_bin_script
assert_equal true, File.directory?(util_inst_bindir)
installed_exec = File.join(util_inst_bindir, 'executable')
assert_equal true, File.exist?(installed_exec)
- assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+ assert_equal mask, File.stat(installed_exec).mode unless win_platform?
wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
@@ -249,7 +249,7 @@ def test_generate_bin_script_install_dir
installed_exec = File.join("#{@gemhome}2", 'bin', 'executable')
assert_equal true, File.exist?(installed_exec)
- assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+ assert_equal mask, File.stat(installed_exec).mode unless win_platform?
wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
@@ -298,7 +298,7 @@ def test_generate_bin_script_no_shebang
installed_exec = File.join @gemhome, 'bin', 'executable'
assert_equal true, File.exist?(installed_exec)
- assert_equal ( 0100755 & (~ File.umask)), File.stat(installed_exec).mode unless win_platform?
+ assert_equal mask, File.stat(installed_exec).mode unless win_platform?
wrapper = File.read installed_exec
assert_match %r|generated by RubyGems|, wrapper
@@ -323,7 +323,7 @@ def test_generate_bin_script_wrappers
@installer.generate_bin
assert_equal true, File.directory?(util_inst_bindir)
assert_equal true, File.exist?(installed_exec)
- assert_equal(( 0100755 & (~ File.umask)), File.stat(installed_exec).mode) unless win_platform?
+ assert_equal mask, File.stat(installed_exec).mode unless win_platform?
assert_match %r|generated by RubyGems|, File.read(installed_exec)
@@ -1014,5 +1014,9 @@ def util_execless
@installer = util_installer @spec, gem, @gemhome
end
+ def mask
+ 0100755 & (~File.umask)
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.