Skip to content

Commit

Permalink
Add output before running spec:parts
Browse files Browse the repository at this point in the history
  • Loading branch information
James Hart committed Nov 7, 2015
1 parent ba122cf commit 16eb6e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/tasks/rspec_parts.rake
Expand Up @@ -5,10 +5,14 @@ if defined?(RSpec)
desc 'Run part M of N specs'
RSpec::Core::RakeTask.new(:part, :part, :groups) do |task, task_args|
config = Rspec::Parts.config

groups = task_args[:groups].to_i == 0 ? config.default_number_of_parts : task_args[:groups].to_i
part = (task_args[:part].to_i == 0 ? 1 : task_args[:part].to_i) - 1
part = (task_args[:part].to_i == 0 ? 1 : task_args[:part].to_i)
part_index = part - 1

puts "Running part #{part} of #{groups} groups"

file_list = Rspec::Parts::FileList.from(glob: config.spec_directory_glob, groups: groups, part: part)
file_list = Rspec::Parts::FileList.from(glob: config.spec_directory_glob, groups: groups, part: part_index)
config.file_list_exclusions.each do |exclusion|
file_list.exclude(exclusion)
end
Expand Down

0 comments on commit 16eb6e9

Please sign in to comment.