diff options
author | Pablo Ifran <pabloifran@gmail.com> | 2012-10-22 09:42:42 -0200 |
---|---|---|
committer | Pablo Ifran <pabloifran@gmail.com> | 2012-10-22 09:42:42 -0200 |
commit | e041a50f2917f82950f9e5666f966d8992afd45d (patch) | |
tree | 9f4d2e3aa88f28dba9d7a1d24d46977e0642a1eb /railties/lib/rails/test_unit/testing.rake | |
parent | 3e6b2f5d38e0f31db3fb0fcd3bbab92666a0e3e2 (diff) | |
parent | ae27acb342c575ce19d5ad78cb13ba23f826fab1 (diff) | |
download | rails-e041a50f2917f82950f9e5666f966d8992afd45d.tar.gz rails-e041a50f2917f82950f9e5666f966d8992afd45d.tar.bz2 rails-e041a50f2917f82950f9e5666f966d8992afd45d.zip |
Merge branch 'master' of https://github.com/lifo/docrails
Conflicts:
activerecord/lib/active_record/callbacks.rb
Diffstat (limited to 'railties/lib/rails/test_unit/testing.rake')
-rw-r--r-- | railties/lib/rails/test_unit/testing.rake | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake index 63cb955d44..cd59fbe599 100644 --- a/railties/lib/rails/test_unit/testing.rake +++ b/railties/lib/rails/test_unit/testing.rake @@ -43,7 +43,7 @@ module Kernel end end -task :default => :test +task default: :test desc 'Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile)' task :test do @@ -61,7 +61,7 @@ namespace :test do Rake::Task[task].invoke nil rescue => e - { :task => task, :exception => e } + { task: task, exception: e } end end.compact @@ -71,7 +71,7 @@ namespace :test do end end - Rake::TestTask.new(:recent => "test:prepare") do |t| + Rake::TestTask.new(recent: "test:prepare") do |t| since = TEST_CHANGES_SINCE touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } + recent_tests('app/models/**/*.rb', 'test/models', since) + @@ -84,7 +84,7 @@ namespace :test do end Rake::Task['test:recent'].comment = "Test recent changes" - Rake::TestTask.new(:uncommitted => "test:prepare") do |t| + Rake::TestTask.new(uncommitted: "test:prepare") do |t| def t.file_list if File.directory?(".svn") changed_since_checkin = silence_stderr { `svn status` }.split.map { |path| path.chomp[7 .. -1] } @@ -108,52 +108,52 @@ namespace :test do end Rake::Task['test:uncommitted'].comment = "Test changes since last checkin (only Subversion and Git)" - Rake::TestTask.new(:single => "test:prepare") do |t| + Rake::TestTask.new(single: "test:prepare") do |t| t.libs << "test" end - Rails::SubTestTask.new(:models => "test:prepare") do |t| + Rails::SubTestTask.new(models: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/models/**/*_test.rb' end - Rails::SubTestTask.new(:helpers => "test:prepare") do |t| + Rails::SubTestTask.new(helpers: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/helpers/**/*_test.rb' end - Rails::SubTestTask.new(:units => "test:prepare") do |t| + Rails::SubTestTask.new(units: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/{models,helpers,unit}/**/*_test.rb' end - Rails::SubTestTask.new(:controllers => "test:prepare") do |t| + Rails::SubTestTask.new(controllers: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/controllers/**/*_test.rb' end - Rails::SubTestTask.new(:mailers => "test:prepare") do |t| + Rails::SubTestTask.new(mailers: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/mailers/**/*_test.rb' end - Rails::SubTestTask.new(:functionals => "test:prepare") do |t| + Rails::SubTestTask.new(functionals: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/{controllers,mailers,functional}/**/*_test.rb' end - Rails::SubTestTask.new(:integration => "test:prepare") do |t| + Rails::SubTestTask.new(integration: "test:prepare") do |t| t.libs << "test" t.pattern = 'test/integration/**/*_test.rb' end - Rails::SubTestTask.new(:benchmark => 'test:prepare') do |t| + Rails::SubTestTask.new(benchmark: 'test:prepare') do |t| t.libs << 'test' t.pattern = 'test/performance/**/*_test.rb' t.options = '-- --benchmark' end - Rails::SubTestTask.new(:profile => 'test:prepare') do |t| + Rails::SubTestTask.new(profile: 'test:prepare') do |t| t.libs << 'test' t.pattern = 'test/performance/**/*_test.rb' end |