Rails 3.1 rake test:配置文件弃用警告和空输出文件

时间:2011-10-20 08:32:54

标签: ruby-on-rails ruby ruby-on-rails-3 profiling

当runnign rake test:profile 时,我得到:

  

DEPRECATION WARNING:不推荐使用read_csv_fixture_files   从Rails 3.2中删除。 (在自动运行中从块中调用   /Users/hade/.rvm/rubies/ruby-1.9.2-p290-perf/lib/ruby/1.9.1/minitest/unit.rb:508)

第508行附近的Unit.rb:

  def self.autorun
  at_exit {
    next if $! # don't run if there was an exception

    # the order here is important. The at_exit handler must be
    # installed before anyone else gets a chance to install their
    # own, that way we can be assured that our exit will be last
    # to run (at_exit stacks).
    exit_code = nil

    at_exit { exit false if exit_code && exit_code != 0 }
    exit_code = MiniTest::Unit.new.run(ARGV)   <------ LINE 508
  } unless @@installed_at_exit
  @@installed_at_exit = true
end

MiniTest是否正在调用此read_csv_fixture_files方法?我的设置是正常的行为吗?我该如何删除?

我的环境:

  • Rails 3.1.0
  • Ruby 1.9.2-p290 with GC-patch

我的测试似乎运行正常,但我的输出文件没用。在我的输出文件中,我只有这一行:

ActiveSupport::Testing::Performance::Profiler#run

但是当我运行 rails profiler'User.all'时,我得到了很好的控制台输出和带有一些内容的输出文件。

任何帮助都会非常感激。我尝试过使用GC-patch的不同Ruby版本,但没有帮助。

0 个答案:

没有答案
相关问题