Class: PDK::Test::Unit

Inherits:
Object
  • Object
show all
Defined in:
lib/pdk/tests/unit.rb

Class Method Summary collapse

Class Method Details

.cmd(_tests) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/pdk/tests/unit.rb', line 8

def self.cmd(_tests)
  # TODO: actually run the tests
  # cmd = 'rake spec'
  # cmd += " #{tests}" if tests
  cmd = 'pwd'
  cmd
end

.invoke(tests, report = nil) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/pdk/tests/unit.rb', line 16

def self.invoke(tests, report = nil)
  PDK::Util::Bundler.ensure_bundle!

  puts _('Running unit tests: %{tests}') % { tests: tests }

  output = PDK::CLI::Exec.execute(cmd(tests))
  report.write(output) if report
end