I''ve got a test suite that runs fine from the command line but fails
from rake. We''ve got a database table in our app that causes
db:test:clone to fail. From the command line, db:test:clone_structure works ok,
so I tried to override db:test:clone in the Rakefile. When I ''rake
test'', the unit tests run successfully, but the integration tests all
fail (they all run successfully from the command line). I''ll copy the
Rakefile below. If anybody''s got any ideas about what I might be doing
wrong, I''d really appreciate hearing them.
Thanks,
Bill
======== Rakefile ========require(File.join(File.dirname(__FILE__),
''config'', ''boot''))
require ''rake''
require ''rake/testtask''
require ''rake/rdoctask''
require ''tasks/rails''
# don''t clone the test database; use clone_structure
# so Rake doesn''t abort on the fulltext index
Rake::TaskManager.class_eval do
def delete_task(task_name)
@tasks.delete(task_name.to_s)
end
Rake.application.delete_task("db:test:clone")
end
namespace :db do
namespace :test do
task :clone do
Rake::Task["db:test:clone_structure"].invoke
end
end
end
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---