Permalink
Browse files

Update test related rake tasks

  • Loading branch information...
1 parent f73412b commit ff48741262f3b728430703300cd0bb36f0b3218b @shuber committed Jun 4, 2009
Showing with 16 additions and 11 deletions.
  1. +3 −0 CHANGELOG
  2. +10 −8 Rakefile
  3. +3 −3 test/init.rb
View
@@ -1,3 +1,6 @@
+2009-06-04 - Sean Huber (shuber@huberry.com)
+ * Update test related rake tasks
+
2009-05-20 - Sean Huber (shuber@huberry.com)
* Update date in gemspec so github rebuilds gem
View
@@ -3,15 +3,17 @@ require 'rake/testtask'
require 'rake/rdoctask'
desc 'Default: run the proxy tests'
-task :default => :test_all_versions
+task :default => :test
-desc 'Default: run the proxy tests for all versions of actionpack'
-task :test_all_versions do
- versions = `gem list`.match(/actionpack \((.+)\)/).captures[0].split(/, /).select { |v| v[0,1].to_i > 1 }
- versions.each do |version|
- puts "\n\n============================================================="
- puts "TESTING WITH ACTION PACK VERSION #{version}\n\n"
- system "rake test ACTION_PACK_VERSION=#{version}"
+namespace :test do
+ desc 'Default: run the proxy tests for all versions of actionpack'
+ task :all do
+ versions = `gem list`.match(/actionpack \((.+)\)/).captures[0].split(/, /).select { |v| v[0,1].to_i > 1 }
+ versions.each do |version|
+ puts "\n\n============================================================="
+ puts "TESTING WITH ACTION PACK VERSION #{version}\n\n"
+ system "rake test ACTION_PACK_VERSION=#{version}"
+ end
end
end
View
@@ -1,5 +1,3 @@
-raise 'Must specify ACTION_PACK_VERSION' unless ENV['ACTION_PACK_VERSION']
-
$:.reject! { |path| path.include? 'TextMate' }
require 'test/unit'
@@ -9,7 +7,9 @@
# Load ActionPack
#
-gem 'actionpack', ENV['ACTION_PACK_VERSION']
+args = ['actionpack']
+args << ENV['ACTION_PACK_VERSION'] if ENV['ACTION_PACK_VERSION']
+gem *args
require 'action_pack'
require 'action_controller'
require 'action_controller/routing'

0 comments on commit ff48741

Please sign in to comment.