Skip to content

Commit

Permalink
Merge pull request #213 from Shopify/rwstauner/test-args
Browse files Browse the repository at this point in the history
Allow specifying files to test with 'dev test'
  • Loading branch information
rwstauner committed May 16, 2023
2 parents 9e3ae70 + 04db0ee commit d57c166
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ require 'ci/queue/version'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/*_test.rb'] - FileList['test/fixtures/**/*_test.rb']
selected_files = ENV["TEST_FILES"].to_s.strip.split(/\s+/)
selected_files = nil if selected_files.empty?
t.test_files = selected_files || FileList['test/**/*_test.rb'] - FileList['test/fixtures/**/*_test.rb']
end

task :default => :test
Expand Down
2 changes: 1 addition & 1 deletion ruby/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ up:
- isogun

commands:
test: REDIS_URL=${REDIS_URL:-redis://ci-queue.railgun/0} bundle exec rake test
test: REDIS_URL=${REDIS_URL:-redis://ci-queue.railgun/0} bundle exec rake test TEST_FILES="$*"

0 comments on commit d57c166

Please sign in to comment.