summaryrefslogtreecommitdiff
path: root/jni/ruby/test/rake/test_rake_reduce_compat.rb
blob: d2952665404bcb3545453b014f3877660d7d506c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require File.expand_path('../helper', __FILE__)
require 'open3'

class TestRakeReduceCompat < Rake::TestCase
  include RubyRunner

  def invoke_normal(task_name)
    rake task_name.to_s
    @out
  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
    }

    assert_equal "nil", invoke_normal(:check_task).chomp
    assert_equal "nil", invoke_normal(:check_file).chomp
  end
end