summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_reduce_compat.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rake/test_rake_reduce_compat.rb')
-rw-r--r--test/rake/test_rake_reduce_compat.rb47
1 files changed, 4 insertions, 43 deletions
diff --git a/test/rake/test_rake_reduce_compat.rb b/test/rake/test_rake_reduce_compat.rb
index 6da8e42..d295266 100644
--- a/test/rake/test_rake_reduce_compat.rb
+++ b/test/rake/test_rake_reduce_compat.rb
@@ -2,19 +2,11 @@ require File.expand_path('../helper', __FILE__)
require 'open3'
class TestRakeReduceCompat < Rake::TestCase
- # TODO: factor out similar code in test_rake_functional.rb
- def rake(*args)
- Open3.popen3(RUBY, "-I", @rake_lib, @rake_exec, *args) { |_, out, _, _|
- out.read
- }
- end
+ include RubyRunner
def invoke_normal(task_name)
rake task_name.to_s
- end
-
- def invoke_reduce_compat(task_name)
- rake "--reduce-compat", task_name.to_s
+ @out
end
def test_no_deprecated_dsl
@@ -28,38 +20,7 @@ class TestRakeReduceCompat < Rake::TestCase
end
}
- assert_equal %{"method"}, invoke_normal(:check_task).chomp
- assert_equal %{"method"}, invoke_normal(:check_file).chomp
-
- assert_equal "nil", invoke_reduce_compat(:check_task).chomp
- assert_equal "nil", invoke_reduce_compat(:check_file).chomp
- end
-
- def test_no_classic_namespace
- rakefile %q{
- task :check_task do
- begin
- Task
- print "present"
- rescue NameError
- print "absent"
- end
- end
-
- task :check_file_task do
- begin
- FileTask
- print "present"
- rescue NameError
- print "absent"
- end
- end
- }
-
- assert_equal "present", invoke_normal(:check_task)
- assert_equal "present", invoke_normal(:check_file_task)
-
- assert_equal "absent", invoke_reduce_compat(:check_task)
- assert_equal "absent", invoke_reduce_compat(:check_file_task)
+ assert_equal "nil", invoke_normal(:check_task).chomp
+ assert_equal "nil", invoke_normal(:check_file).chomp
end
end