Today I was able to resolve the issue by adding a new task to our list of tasks that get run when cruise completes a build.
desc 'resets the column info for all models'
namespace :columns do
task :reset => :environment do
ActiveRecord::Base.reset_column_information
ActiveRecord::Base.send(:subclasses).each{|klass| klass.reset_column_information rescue nil}
end
end
Now, our cruise task looks like this:
task :cruise do
['test_env_init', 'db:rollback', 'columns:reset', 'db:migrate','test', 'spec:cruise:rcov'].each do |task|
Rake::Task[task].invoke
end
...
And cruisecontrol.rb is much happier...as is our development team!
No comments:
Post a Comment