Add the has_many_polymorphs plugin
[cs356-p2-videostore.git] / vendor / plugins / has_many_polymorphs / test / test_all.rb
diff --git a/vendor/plugins/has_many_polymorphs/test/test_all.rb b/vendor/plugins/has_many_polymorphs/test/test_all.rb
new file mode 100644 (file)
index 0000000..8280269
--- /dev/null
@@ -0,0 +1,16 @@
+
+# Run tests against all Rails versions
+
+VENDOR_DIR = File.expand_path("~/Desktop/projects/vendor/rails")
+
+HERE = File.expand_path(File.dirname(__FILE__))
+
+Dir["#{VENDOR_DIR}/*"].each do |dir|
+  puts "\n\n**** #{dir} ****\n\n"
+  Dir.chdir "#{HERE}/integration/app/vendor" do  
+    system("rm rails; ln -s #{dir} rails")    
+  end
+  system("ruby #{HERE}/unit/polymorph_test.rb")
+end
+
+system("rm #{HERE}/integration/app/vendor; svn up #{HERE}/integration/app/vendor")