aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/tasks/testing.rake12
2 files changed, 9 insertions, 5 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index ffe23daeca..24a82e89fe 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Change test:uncommitted to delay execution of `svn status` by using internal Rake API's. [Nicholas Seckar]
+
* Use require_library_or_gem to load rake in commands/server.rb. Closes #4205. [rob.rasmussen@gmail.com]
* Use the Rake API instead of shelling out to create the tmp directory in commands/server.rb. [Chad Fowler]
diff --git a/railties/lib/tasks/testing.rake b/railties/lib/tasks/testing.rake
index 5ccef4149b..f5ccc1a19b 100644
--- a/railties/lib/tasks/testing.rake
+++ b/railties/lib/tasks/testing.rake
@@ -50,13 +50,15 @@ namespace :test do
desc 'Test changes since last checkin (only Subversion)'
Rake::TestTask.new(:uncommitted => "db:test:prepare") do |t|
- changed_since_checkin = silence_stderr { `svn status` }.map { |path| path.chomp[7 .. -1] }
- models = changed_since_checkin.select { |path| path =~ /app\/models\/.*\.rb/ }
- tests = models.map { |model| "test/unit/#{File.basename(model, '.rb')}_test.rb" }
-
+ def t.file_list
+ changed_since_checkin = silence_stderr { `svn status` }.map { |path| path.chomp[7 .. -1] }
+ models = changed_since_checkin.select { |path| path =~ /app\/models\/.*\.rb/ }
+ tests = models.map { |model| "test/unit/#{File.basename(model, '.rb')}_test.rb" }
+ tests.uniq
+ end
+
t.libs << 'test'
t.verbose = true
- t.test_files = tests.uniq
end
desc "Run the unit tests in test/unit"