Class: Thrust::Tasks::Nof
- Inherits:
-
Object
- Object
- Thrust::Tasks::Nof
- Defined in:
- lib/thrust/tasks/nof.rb
Constant Summary collapse
- FOCUSED_METHODS =
%w[fit(@ fcontext(@ fdescribe(@]
Instance Method Summary collapse
-
#initialize(executor = Thrust::Executor.new) ⇒ Nof
constructor
A new instance of Nof.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/thrust/tasks/nof.rb', line 10 def run substitutions = FOCUSED_METHODS.map do |method| unfocused_method = method.sub(/^f/, '') "-e 's/#{method}/#{unfocused_method}/g;'" end @executor.system_or_exit %Q[rake focused_specs | xargs -I filename sed -i '' #{substitutions.join(' ')} "filename"] end |