Skip to content

Commit

Permalink
Add TEST_DIRS enviroment for constrain test directories in rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
hbakhtiyor committed Apr 8, 2013
1 parent a92814b commit b28e5c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions railties/Rakefile
Expand Up @@ -12,8 +12,9 @@ task :test => 'test:isolated'


namespace :test do namespace :test do
task :isolated do task :isolated do
dir = ENV["TEST_DIR"] || "**" dirs = (ENV["TEST_DIR"] || ENV["TEST_DIRS"] || "**").split(",")
Dir["test/#{dir}/*_test.rb"].each do |file| test_files = dirs.map { |dir| "test/#{dir}/*_test.rb" }
Dir[*test_files].each do |file|
next true if file.include?("fixtures") next true if file.include?("fixtures")
dash_i = [ dash_i = [
'test', 'test',
Expand Down

0 comments on commit b28e5c3

Please sign in to comment.