class RSpecRedo::RakeTask
Constants
- RSPEC_REDO_PATH
Attributes
retry_count[RW]
Public Class Methods
new(name = 'spec:redo', *args) { |self| ... }
click to toggle source
Calls superclass method
# File lib/rspec-redo/rake_task.rb, line 9 def initialize(name = 'spec:redo', *args, &block) @retry_count = ENV['RETRY_COUNT'] unless ::Rake.application.last_description desc 'Run RSpec code examples with RSpecRedo' end super(name, :retry_count, *args) do |t, opts| @retry_count = opts.retry_count yield self if block_given? end end
Public Instance Methods
rspec_opts()
click to toggle source
@override Include the retry_count
if it's provided
Calls superclass method
# File lib/rspec-redo/rake_task.rb, line 30 def rspec_opts return super unless retry_count [*super, '--retry-count', retry_count] end
rspec_path()
click to toggle source
@override Swap out RSpec for the Redo CLI
# File lib/rspec-redo/rake_task.rb, line 24 def rspec_path RSPEC_REDO_PATH end
Private Instance Methods
rspec_load_path()
click to toggle source
@override We don't need to require rspec libs for this command
# File lib/rspec-redo/rake_task.rb, line 39 def rspec_load_path end