1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added test:uncommitted to test changes since last checkin to Subversion (closes #4035) [technomancy@gmail.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2006-03-02 00:17:53 +00:00
parent a434cec2e6
commit 8fdb4bc8f6
2 changed files with 14 additions and 1 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Added test:uncommitted to test changes since last checkin to Subversion #4035 [technomancy@gmail.com]
* Help script/about print the correct svn revision when in a non-English locale. #4026 [babie7a0@ybb.ne.jp]
* Add 'app' accessor to script/console as an instance of Integration::Session [Jamis Buck]

View file

@ -35,6 +35,17 @@ namespace :test do
t.verbose = true
t.test_files = touched.uniq
end
desc 'Test changes since last checkin (only Subversion)'
Rake::TestTask.new(:uncommitted => "db:test:prepare") do |t|
changed_since_checkin = `svn status`.map { |path| path.chomp[7 .. -1] }
models = changed_since_checkin.delete_if { |path| not path =~ /app\/models\/.*\.rb/ }
tests = models.map { |model| "test/unit/#{File.basename(model, '.rb')}_test.rb" }
t.libs << 'test'
t.verbose = true
t.test_files = tests.uniq
end
desc "Run the unit tests in test/unit"
Rake::TestTask.new(:units => "db:test:prepare") do |t|
@ -69,4 +80,4 @@ namespace :test do
t.verbose = true
end
end
end