summaryrefslogtreecommitdiff
path: root/test/rake
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 11:55:52 +0000
commit3a47cf3395dd4c4fe8bdd5df13aab698f2ca314b (patch)
treec4a278220ba8141b829c5c7b0777c1049cfe413c /test/rake
parent39da1b63699faf30c86e753e193c29b81b16136d (diff)
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake')
-rw-r--r--test/rake/in_environment.rb4
-rw-r--r--test/rake/test_application.rb30
-rw-r--r--test/rake/test_definitions.rb4
-rw-r--r--test/rake/test_earlytime.rb2
-rw-r--r--test/rake/test_extension.rb4
-rw-r--r--test/rake/test_file_task.rb2
-rw-r--r--test/rake/test_filelist.rb22
-rw-r--r--test/rake/test_fileutils.rb10
-rw-r--r--test/rake/test_multitask.rb2
-rw-r--r--test/rake/test_pathmap.rb2
-rw-r--r--test/rake/test_rake.rb2
-rw-r--r--test/rake/test_task_arguments.rb2
-rw-r--r--test/rake/test_task_manager.rb4
-rw-r--r--test/rake/test_test_task.rb2
14 files changed, 46 insertions, 46 deletions
diff --git a/test/rake/in_environment.rb b/test/rake/in_environment.rb
index f0a340fac9..f6fd8fb731 100644
--- a/test/rake/in_environment.rb
+++ b/test/rake/in_environment.rb
@@ -1,11 +1,11 @@
module InEnvironment
private
-
+
# Create an environment for a test. At the completion of the yielded
# block, the environment is restored to its original conditions.
def in_environment(settings)
original_settings = set_env(settings)
- yield
+ yield
ensure
set_env(original_settings) if original_settings
end
diff --git a/test/rake/test_application.rb b/test/rake/test_application.rb
index 9158689e65..27c7d8df05 100644
--- a/test/rake/test_application.rb
+++ b/test/rake/test_application.rb
@@ -123,7 +123,7 @@ class Rake::TestApplication < Test::Unit::TestCase
def test_load_rakefile
in_environment("PWD" => File.join(BASEDIR, "data/unittest")) do
- @app.instance_eval do
+ @app.instance_eval do
handle_options
options.silent = true
load_rakefile
@@ -151,8 +151,8 @@ class Rake::TestApplication < Test::Unit::TestCase
handle_options
options.silent = true
end
- ex = assert_raise(RuntimeError) do
- @app.instance_eval do raw_load_rakefile end
+ ex = assert_raise(RuntimeError) do
+ @app.instance_eval do raw_load_rakefile end
end
assert_match(/no rakefile found/i, ex.message)
end
@@ -313,7 +313,7 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
RakeFileUtils.verbose_flag = false
RakeFileUtils.nowrite_flag = false
end
-
+
def clear_argv
while ! ARGV.empty?
ARGV.pop
@@ -519,7 +519,7 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
assert_equal :exit, @exit
end
end
-
+
def test_classic_namespace
flags(['--classic-namespace'], ['-C', '-T', '-P', '-n', '-s', '-t']) do |opts|
assert opts.classic_namespace
@@ -534,7 +534,7 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
def test_bad_option
capture_stderr do
ex = assert_raise(OptionParser::InvalidOption) do
- flags('--bad-option')
+ flags('--bad-option')
end
if ex.message =~ /^While/ # Ruby 1.9 error message
assert_match(/while parsing/i, ex.message)
@@ -549,12 +549,12 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
command_line("a", "b")
assert_equal ["a", "b"], @tasks.sort
end
-
+
def test_default_task_collection
command_line()
assert_equal ["default"], @tasks
end
-
+
def test_environment_definition
ENV.delete('TESTKEY')
command_line("a", "TESTKEY=12")
@@ -562,12 +562,12 @@ class Rake::TestApplicationOptions < Test::Unit::TestCase
assert '12', ENV['TESTKEY']
end
- private
+ private
def flags(*sets)
sets.each do |set|
ARGV.clear
- @out = capture_stdout {
+ @out = capture_stdout {
@exit = catch(:system_exit) { opts = command_line(*set) }
}
yield(@app.options) if block_given?
@@ -593,31 +593,31 @@ class Rake::TestTaskArgumentParsing < Test::Unit::TestCase
def setup
@app = Rake::Application.new
end
-
+
def test_name_only
name, args = @app.parse_task_string("name")
assert_equal "name", name
assert_equal [], args
end
-
+
def test_empty_args
name, args = @app.parse_task_string("name[]")
assert_equal "name", name
assert_equal [], args
end
-
+
def test_one_argument
name, args = @app.parse_task_string("name[one]")
assert_equal "name", name
assert_equal ["one"], args
end
-
+
def test_two_arguments
name, args = @app.parse_task_string("name[one,two]")
assert_equal "name", name
assert_equal ["one", "two"], args
end
-
+
def test_can_handle_spaces_between_args
name, args = @app.parse_task_string("name[one, two,\tthree , \tfour]")
assert_equal "name", name
diff --git a/test/rake/test_definitions.rb b/test/rake/test_definitions.rb
index 164958ecd5..a5440dcadc 100644
--- a/test/rake/test_definitions.rb
+++ b/test/rake/test_definitions.rb
@@ -6,7 +6,7 @@ require_relative 'filecreation'
######################################################################
class Rake::TestDefinitions < Test::Unit::TestCase
include Rake
-
+
EXISTINGFILE = "testdata/existing"
def setup
@@ -78,4 +78,4 @@ class Rake::TestDefinitions < Test::Unit::TestCase
end
end
-
+
diff --git a/test/rake/test_earlytime.rb b/test/rake/test_earlytime.rb
index a228146679..d94523cffd 100644
--- a/test/rake/test_earlytime.rb
+++ b/test/rake/test_earlytime.rb
@@ -24,7 +24,7 @@ class Rake::TestEarlyTime < Test::Unit::TestCase
assert t1 < t2
assert t2 > t1
assert t1 == t1
- assert t2 == t2
+ assert t2 == t2
end
def test_to_s
diff --git a/test/rake/test_extension.rb b/test/rake/test_extension.rb
index 94348aafa6..3b10a4c6ed 100644
--- a/test/rake/test_extension.rb
+++ b/test/rake/test_extension.rb
@@ -16,14 +16,14 @@ class Rake::TestExtension < Test::Unit::TestCase
$stderr = old_err
end
end
-
+
class Sample
extend Redirect
def duplicate_method
:original
end
-
+
OK_ERRS = error_redirect do
rake_extension("a") do
def ok_method
diff --git a/test/rake/test_file_task.rb b/test/rake/test_file_task.rb
index 0232ac95ed..132bd88853 100644
--- a/test/rake/test_file_task.rb
+++ b/test/rake/test_file_task.rb
@@ -77,7 +77,7 @@ class Rake::TestFileTask < Test::Unit::TestCase
# deleting the file target on failure is always the proper thing to
# do. I'm willing to hear input on this topic.
def ztest_file_deletes_on_failure
- task :obj
+ task :obj
file NEWFILE => [:obj] do |t|
FileUtils.touch NEWFILE
fail "Ooops"
diff --git a/test/rake/test_filelist.rb b/test/rake/test_filelist.rb
index 08456a4da8..2b1ad44237 100644
--- a/test/rake/test_filelist.rb
+++ b/test/rake/test_filelist.rb
@@ -89,7 +89,7 @@ class Rake::TestFileList < Test::Unit::TestCase
h = f.include("y")
assert_equal f.object_id, h.object_id
end
-
+
def test_match
fl = FileList.new
fl.include(File.expand_path('../test*.rb', __FILE__))
@@ -155,7 +155,7 @@ class Rake::TestFileList < Test::Unit::TestCase
fl.exclude('testdata/existing')
assert_equal [], fl
end
-
+
def test_excluding_via_block
fl = FileList['testdata/a.c', 'testdata/b.c', 'testdata/xyz.c']
fl.exclude { |fn| fn.pathmap('%n') == 'xyz' }
@@ -235,24 +235,24 @@ class Rake::TestFileList < Test::Unit::TestCase
assert_equal ["testdata/abc.o", "testdata/x.o", "testdata/xyz.o"].sort,
f3.sort
end
-
+
def test_claim_to_be_a_kind_of_array
fl = FileList['testdata/*.c']
assert fl.is_a?(Array)
assert fl.kind_of?(Array)
end
-
+
def test_claim_to_be_a_kind_of_filelist
fl = FileList['testdata/*.c']
assert fl.is_a?(FileList)
assert fl.kind_of?(FileList)
end
-
+
def test_claim_to_be_a_filelist_instance
fl = FileList['testdata/*.c']
assert fl.instance_of?(FileList)
end
-
+
def test_dont_claim_to_be_an_array_instance
fl = FileList['testdata/*.c']
assert ! fl.instance_of?(Array)
@@ -590,12 +590,12 @@ class Rake::TestFileList < Test::Unit::TestCase
assert_equal ['b', 'd'], r
assert_equal FileList, r.class
end
-
+
def test_file_utils_can_use_filelists
cfiles = FileList['testdata/*.c']
-
+
cp cfiles, @cdir, :verbose => false
-
+
assert File.exist?(File.join(@cdir, 'abc.c'))
assert File.exist?(File.join(@cdir, 'xyz.c'))
assert File.exist?(File.join(@cdir, 'x.c'))
@@ -603,7 +603,7 @@ class Rake::TestFileList < Test::Unit::TestCase
def create_test_data
verbose(false) do
-
+
mkdir "testdata" unless File.exist? "testdata"
mkdir "testdata/CVS" rescue nil
mkdir "testdata/.svn" rescue nil
@@ -621,5 +621,5 @@ class Rake::TestFileList < Test::Unit::TestCase
touch "testdata/existing"
end
end
-
+
end
diff --git a/test/rake/test_fileutils.rb b/test/rake/test_fileutils.rb
index 1664ec80c3..b6106c0978 100644
--- a/test/rake/test_fileutils.rb
+++ b/test/rake/test_fileutils.rb
@@ -18,7 +18,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
@oldruby = nil
end
end
-
+
def teardown
FileUtils.rm_rf("testdata")
FileUtils::LN_SUPPORTED[0] = true
@@ -28,7 +28,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
FileUtils.class_eval {const_set(:RUBY, ruby)}
end
end
-
+
def test_rm_one_file
create_file("testdata/a")
FileUtils.rm_rf "testdata/a"
@@ -165,7 +165,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
end
def test_sh_failure
- assert_raise(RuntimeError) {
+ assert_raise(RuntimeError) {
verbose(false) { Sh.run "#{RUBY} #{File.expand_path('../shellcommand.rb', __FILE__)} 1" }
}
end
@@ -241,7 +241,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
end
private
-
+
def redirect_stderr
old_err = $stderr
$stderr = StringIO.new
@@ -258,5 +258,5 @@ class Rake::TestFileUtils < Test::Unit::TestCase
def env_var
windows? ? '%RAKE_TEST_SH%' : '$RAKE_TEST_SH'
end
-
+
end
diff --git a/test/rake/test_multitask.rb b/test/rake/test_multitask.rb
index 9711e7e77e..0413d03db3 100644
--- a/test/rake/test_multitask.rb
+++ b/test/rake/test_multitask.rb
@@ -40,4 +40,4 @@ class Rake::TestMultiTask < Test::Unit::TestCase
end
end
-
+
diff --git a/test/rake/test_pathmap.rb b/test/rake/test_pathmap.rb
index 257529ab87..2775b91039 100644
--- a/test/rake/test_pathmap.rb
+++ b/test/rake/test_pathmap.rb
@@ -23,7 +23,7 @@ class Rake::TestPathMap < Test::Unit::TestCase
def test_n_returns_basename_without_extension
assert_equal "abc", "abc.rb".pathmap("%n")
- assert_equal "abc", "abc".pathmap("%n")
+ assert_equal "abc", "abc".pathmap("%n")
assert_equal "abc", "this/is/a/dir/abc.rb".pathmap("%n")
assert_equal "abc", "/this/is/a/dir/abc.rb".pathmap("%n")
assert_equal "abc", "/this/is/a/dir/abc".pathmap("%n")
diff --git a/test/rake/test_rake.rb b/test/rake/test_rake.rb
index 52230fe148..44fecee559 100644
--- a/test/rake/test_rake.rb
+++ b/test/rake/test_rake.rb
@@ -35,5 +35,5 @@ class Rake::TestRake < Test::Unit::TestCase
def test_original_dir_reports_current_dir
assert_equal Dir.pwd, Rake.original_dir
end
-
+
end
diff --git a/test/rake/test_task_arguments.rb b/test/rake/test_task_arguments.rb
index d40144f3fd..9e907aed7d 100644
--- a/test/rake/test_task_arguments.rb
+++ b/test/rake/test_task_arguments.rb
@@ -76,7 +76,7 @@ class Rake::TestTaskArguments < Test::Unit::TestCase
child = Rake::TaskArguments.new(['aa'], [2], parent)
assert_equal 2, child.aa
end
-
+
def test_default_arguments_values_can_be_merged
ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"])
ta.with_defaults({ :aa => 'default_val' })
diff --git a/test/rake/test_task_manager.rb b/test/rake/test_task_manager.rb
index 1e92e25fbf..3ab039ca85 100644
--- a/test/rake/test_task_manager.rb
+++ b/test/rake/test_task_manager.rb
@@ -135,7 +135,7 @@ class Rake::TestTaskManager < Test::Unit::TestCase
end
end
assert_equal t1, @tm[:t, []]
- assert_equal t2, @tm[:t, ["a"]]
+ assert_equal t2, @tm[:t, ["a"]]
assert_equal t3, @tm[:t, ["a", "b"]]
assert_equal s, @tm[:s, ["a", "b"]]
assert_equal s, @tm[:s, ["a"]]
@@ -153,7 +153,7 @@ class Rake::TestTaskManager < Test::Unit::TestCase
@tm["a:x"].invoke
assert_equal ["next z"], values
end
-
+
end
class Rake::TestTaskManagerArgumentResolution < Test::Unit::TestCase
diff --git a/test/rake/test_test_task.rb b/test/rake/test_test_task.rb
index a0dc7a0717..0b7dbc625b 100644
--- a/test/rake/test_test_task.rb
+++ b/test/rake/test_test_task.rb
@@ -4,7 +4,7 @@ require 'rake/testtask'
class Rake::TestTestTask < Test::Unit::TestCase
include Rake
-
+
def setup
@oldwd = Dir.pwd
@tmpwd = Dir.mktmpdir