2012-11-15 16:59:37 -05:00
|
|
|
require File.expand_path('../helper', __FILE__)
|
|
|
|
require 'open3'
|
|
|
|
|
|
|
|
class TestRakeReduceCompat < Rake::TestCase
|
2013-10-11 17:35:01 -04:00
|
|
|
include RubyRunner
|
2012-11-16 01:41:05 -05:00
|
|
|
|
2012-11-15 16:59:37 -05:00
|
|
|
def invoke_normal(task_name)
|
|
|
|
rake task_name.to_s
|
2013-10-11 17:35:01 -04:00
|
|
|
@out
|
2012-11-15 16:59:37 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def test_no_deprecated_dsl
|
|
|
|
rakefile %q{
|
|
|
|
task :check_task do
|
|
|
|
Module.new { p defined?(task) }
|
|
|
|
end
|
|
|
|
|
|
|
|
task :check_file do
|
|
|
|
Module.new { p defined?(file) }
|
|
|
|
end
|
|
|
|
}
|
2012-11-16 01:41:05 -05:00
|
|
|
|
2013-10-11 17:35:01 -04:00
|
|
|
assert_equal "nil", invoke_normal(:check_task).chomp
|
|
|
|
assert_equal "nil", invoke_normal(:check_file).chomp
|
2012-11-15 16:59:37 -05:00
|
|
|
end
|
|
|
|
end
|