views:

17

answers:

1

I am attempting to run basic unit tests.

When I run rake test:units the output initially shows files being loaded i.e. rake_test_loader, *_test.rb. There is no output after this however. The task exits with no errors.

I have also tried running a test indivdually with > ruby unit/some_test.rb There is no output from that either.

Any idea why the test suite is not running?

Here's the 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

and here's the basic test:

require 'test_helper'

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

Try putting gem 'test-unit' before require 'test_help' in your test_helper.rb.

Jason Weathered
I didn't have the test-unit gem so I installed that and tried adding that line but still no joy.
johnnypez
I have had this problem in the past and I thought that was how I solved it. Unfortunately I can't reproduce this on any of my Ruby environments. You could also try adding `require 'test/unit'` after the `gem 'test-unit'` line and try both of those lines right at the top of `test_helper.rb`. Finally, have you ran a `gem update` recently?
Jason Weathered