[rspec-users] RSpec interacting with Test::Unit: weird "is already defined" error

Jo Liss lists at ruby-forum.com
Tue Nov 30 11:28:16 EST 2010


One more thing: If instead of "test 'something'" I write "def 
test_something", like so:

require 'test_helper'
class FirstTest < ActiveSupport::TestCase
  def test_something
    assert_equal 42, 84
  end
end
class SecondTest < ActiveSupport::TestCase
  def test_something
    assert_equal 42, 84
  end
end
describe 'this is an rspec test' do
end

... then adding the last two lines causes the two test_something tests 
to not be picked up at all (so zero tests are run).

Strange, isn't it?

Jo

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list