mirror of
https://github.com/github/rails.git
synced 2026-01-29 00:08:15 -05:00
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:
@@ -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]
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user