My solution was

require File.dirname(__FILE__) + '/../../test_helper'

class Messaging::BulletinTest < Test::Unit::TestCase

  Test::Unit::TestCase.fixture_path= File.dirname(__FILE__) 
+"/../../fixtures/messaging"

  fixtures :messaging_bulletins

  set_fixture_class :messaging_bulletins => Messaging::Bulletin

   def test_database
    assert_equal messaging_bulletins(:one).id, 1
    end
end


notice the Test::Unit::TestCase.fixture_path function sets the path to 
the fixtures which I want to use in this test case.

then I assign the fixture class to my namespaced model.


cheers!
Tim


Tim Glenn wrote:
> I have this issue as well. I noticed that the namespace models are not 
> being found properly or the framework is not finding the fixture class 
> name check out issue #5157
> 
> if you have a solution I'd love to hear it!
> 
> 
> Ingo Weiss wrote:
>> Hi Craig, did you ever figure this out? I seem to have the same problem 
>> where my tests are not able to load fixtures for a name-spaced model. I 
>> get the same error:
>> 
>> FixtureClassNotFound: The class "MyappCountry" was not found.
>> 
>> (my model is Myapp::Country)
>> 
>> Ingo


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to