Hi
I''m writing small replacement for ActiveRecord to support columns
oriented databases (HBase). I put all of my code into /lib folder and
created small rake file into /lib/tasks to support unit testing:
#----- start of file -----
namespace :test do
Rake::TestTask.new(:lib) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = ''test/lib/**/*_test.rb''
t.verbose = true
end
Rake::Task[''test:lib''].comment = "Run the tests in
test/lib"
end
#---- end of file -------
Now i''m able to write unit tests in /test/lib.
My main problem is that my unit tests now do not see any rails loaded
classes, e.g. one of my unit tests uses ActiveRecord::Errors but i''m
getting :
"NameError: uninitialized constant ActiveRecord::Errors"
Do I need to include (require) all rails classes in my unit tests just
to be sure that everything works fine? (in general I included rubygems
and active_record but still getting same error)? Any ideas,
comments, ...?
Thanks
-Zaharije
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.