Delay rake:uncommitted's execution of svn status

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar
2006-03-13 03:21:09 +00:00
parent 3589871de8
commit c07c48d10a
2 changed files with 9 additions and 5 deletions

View File

@@ -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 File

@@ -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"