Class: Physique::TestsTasksBuilder

Inherits:
TasksBuilder show all
Defined in:
lib/physique/task_builders/test.rb

Instance Attribute Summary

Attributes inherited from TasksBuilder

#solution

Instance Method Summary collapse

Methods inherited from TasksBuilder

#build_tasks_for, build_tasks_for, #ensure_output_location, inherited, #namespace, #to_string_or_symbol

Methods included from ToolLocator

#locate_tool, #lookup_tool, #register_tool, #which

Instance Method Details

#add_test_tasksObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/physique/task_builders/test.rb', line 36

def add_test_tasks
  options = solution.test
  defaults = default_runner_config options
  files = options.files || defaults[:files]

  desc 'Run unit tests'

  if defaults && !files.blank?
    test_runner :test => :compile do |tests|
      tests.files = files
      tests.exe = options.exe || locate_tool(defaults[:exe])

      defaults[:parameters].each do |p|
        tests.parameters.add(p)
      end
    end
  else
    task :test => :compile do
      puts 'No test assemblies were detected'
    end
  end
end

#build_tasksObject



32
33
34
# File 'lib/physique/task_builders/test.rb', line 32

def build_tasks
  add_test_tasks
end