Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Delay rake:uncommitted's execution of `svn status`

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit c07c48d10a4b96c83befe25dc27f558bc59cfc9d 1 parent 3589871
@seckar seckar authored
Showing with 9 additions and 5 deletions.
  1. +2 −0  railties/CHANGELOG
  2. +7 −5 railties/lib/tasks/testing.rake
View
2  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]
View
12 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"
Please sign in to comment.
Something went wrong with that request. Please try again.