Class: Corundum::RSpecTask
- Inherits:
-
Mattock::Rake::CommandTask
- Object
- Mattock::Rake::CommandTask
- Corundum::RSpecTask
- Defined in:
- lib/corundum/rspec-task.rb
Direct Known Subclasses
Instance Method Summary collapse
- #all_rspec_options ⇒ Object
- #default_configuration(rspec) ⇒ Object
- #resolve_configuration ⇒ Object
- #resolve_runtime_configuration ⇒ Object
Instance Method Details
#all_rspec_options ⇒ Object
37 38 39 |
# File 'lib/corundum/rspec-task.rb', line 37 def rspec_opts end |
#default_configuration(rspec) ⇒ Object
16 17 18 19 |
# File 'lib/corundum/rspec-task.rb', line 16 def default_configuration(rspec) super rspec.copy_settings_to(self) end |
#resolve_configuration ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/corundum/rspec-task.rb', line 41 def resolve_configuration super if task_args.last.is_a? Hash key = task_args.last.keys.first task_args.last[key] = [*task_args.last[key]] + file_dependencies else key = task_args.pop task_args << { key => file_dependencies } end end |
#resolve_runtime_configuration ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/corundum/rspec-task.rb', line 21 def resolve_runtime_configuration self.rspec_path = %x"which #{rspec_path}".chomp ruby_command. << ruby_opts if ruby_opts ruby_command. << "-w" if warning self.runner_command = cmd(rspec_path) do |cmd| cmd. << cmd. << files_to_run end self.command = ruby_command - runner_command super end |