Skip to content

Commit

Permalink
Fixed duplicate tests in sh testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Mar 8, 2009
1 parent efd93bf commit 02f4ded
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/test_fileutils.rb
Expand Up @@ -141,15 +141,13 @@ def self.run(*args)

def test_sh_with_a_single_string_argument
ENV['RAKE_TEST_SH'] = 'someval'
verbose(false) { sh %{ruby test/check_expansion.rb #{env_var} someval} }
verbose(false) {
Sh.run 'ruby', 'test/check_no_expansion.rb', env_var, 'someval'
sh %{ruby test/check_expansion.rb #{env_var} someval}
}
end

def test_sh_with_multiple_arguments
ENV['RAKE_TEST_SH'] = 'someval'
verbose(false) { sh %{ruby test/check_expansion.rb #{env_var} someval} }
verbose(false) {
Sh.run 'ruby', 'test/check_no_expansion.rb', env_var, 'someval'
}
Expand Down Expand Up @@ -208,7 +206,7 @@ def test_sh_no_verbose
assert_equal '', out
end

def test_ruby_with_a_single_string_argumentx
def test_ruby_with_a_single_string_argument
ENV['RAKE_TEST_SH'] = 'someval'
verbose(false) {
ruby %{test/check_expansion.rb #{env_var} someval}
Expand All @@ -222,10 +220,6 @@ def test_ruby_with_multiple_arguments
}
end

def env_var
windows? ? '%RAKE_TEST_SH%' : '$RAKE_TEST_SH'
end

def test_split_all
assert_equal ['a'], RakeFileUtils.split_all('a')
assert_equal ['..'], RakeFileUtils.split_all('..')
Expand All @@ -250,4 +244,8 @@ def windows?
! File::ALT_SEPARATOR.nil?
end

def env_var
windows? ? '%RAKE_TEST_SH%' : '$RAKE_TEST_SH'
end

end

0 comments on commit 02f4ded

Please sign in to comment.