class Guard::Unity::Runner
Attributes
notifier[RW]
options[RW]
parser[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/guard/unity/runner.rb, line 10 def initialize(options = {}) @options = options @parser = options[:parser] || Guard::Unity::Parser.new(options) @notifier = options[:notifier] || Guard::Unity::Notifier.new end
Public Instance Methods
run()
click to toggle source
# File lib/guard/unity/runner.rb, line 16 def run _run end
Private Instance Methods
_command()
click to toggle source
# File lib/guard/unity/runner.rb, line 29 def _command cmd = [] cmd << options[:unity] cmd << '-projectPath ' + options[:project_path] cmd << '-batchmode -executeMethod UnityTest.UnitTestView.RunAllTestsBatch' cmd.join ' ' end
_execute_command(command)
click to toggle source
# File lib/guard/unity/runner.rb, line 39 def _execute_command(command) %x{#{command}} end
_run()
click to toggle source
# File lib/guard/unity/runner.rb, line 22 def _run UI.info 'Guard::Unity - Starting Tests. Results will be displayed when finished testing.' output = _execute_command _command notifier.notify(parser.parse) if $?.success? output end