Maybe we could do something like:
```ruby
     spec_tasks = Dir['spec/*/'].inject([]) do |result, d|
       result << File.basename(d) unless Dir["#{d}*"].empty?
       result
     end
```