diff options
Diffstat (limited to 'railties/Rakefile')
-rw-r--r-- | railties/Rakefile | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index 8576275aea..9a377ce4ee 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -1,17 +1,16 @@ require 'rake/testtask' require 'rubygems/package_task' -require 'date' -require 'rbconfig' - - task :default => :test + +desc "Run all unit tests" task :test => 'test:isolated' namespace :test do task :isolated do - dir = ENV["TEST_DIR"] || "**" - Dir["test/#{dir}/*_test.rb"].each do |file| + dirs = (ENV["TEST_DIR"] || ENV["TEST_DIRS"] || "**").split(",") + test_files = dirs.map { |dir| "test/#{dir}/*_test.rb" } + Dir[*test_files].each do |file| next true if file.include?("fixtures") dash_i = [ 'test', @@ -20,7 +19,7 @@ namespace :test do "#{File.dirname(__FILE__)}/../actionpack/lib", "#{File.dirname(__FILE__)}/../activemodel/lib" ] - ruby "-I#{dash_i.join ':'}", file + ruby "-w", "-I#{dash_i.join ':'}", file end end end @@ -30,15 +29,7 @@ Rake::TestTask.new('test:regular') do |t| t.pattern = 'test/**/*_test.rb' t.warning = true t.verbose = true -end - -# Update spinoffs ------------------------------------------------------------------- - -desc "Updates application README to the latest version Railties README" -task :update_readme do - readme = "lib/rails/generators/rails/app/templates/README" - rm readme - cp "./README.rdoc", readme + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end # Generate GEM ---------------------------------------------------------------------------- @@ -51,7 +42,7 @@ end # Publishing ------------------------------------------------------- -desc "Release to gemcutter" +desc "Release to rubygems" task :release => :package do require 'rake/gemcutter' Rake::Gemcutter::Tasks.new(spec).define |