测试套件没有在Rails 2.3.5中运行

时间:2010-06-14 11:55:07

标签: ruby-on-rails unit-testing

我正在尝试进行基本的单元测试。

当我运行rake test时:单位输出最初显示正在加载的文件,即rake_test_loader,* _test.rb。 然而,此后没有输出。任务退出时没有错误。

我还尝试使用>单独运行测试。 ruby unit / some_test.rb 也没有输出。

知道为什么测试套件没有运行?

这是test_helper:

ENV["RAILS_ENV"] = "test"

require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'

class ActiveSupport::TestCase

  self.use_transactional_fixtures = false

  self.use_instantiated_fixtures  = false

  #fixtures :all

  # Add more helper methods to be used by all tests here...
end

这是基本测试:

require 'test_helper'

class SomeTest < ActiveSupport::TestCase
  # Replace this with your real tests.
  test "the truth" do
    assert false
  end
end

1 个答案:

答案 0 :(得分:1)

尝试将gem 'test-unit'放在require 'test_help'之前的test_helper.rb

相关问题