class GuardianAngel
@author Vittorio Monaco
Public Class Methods
buildWithConfiguration(configuration)
click to toggle source
Convenience method to build tests in a stand-alone fashion
@param configuration [GAConfiguration] the configuration you want to use to run the tests (see GAConfiguration)
# File lib/guardian_angel.rb, line 18 def self.buildWithConfiguration(configuration) watcher = GuardianAngel.new(configuration) watcher.buildTests() end
new(configuration)
click to toggle source
Creates a new instance given a GAConfiguration
object
@param configuration [GAConfiguration] the configuration you want to use to run the tests (see GAConfiguration)
# File lib/guardian_angel.rb, line 10 def initialize(configuration) @configuration=configuration @runner=XcodebuildRunner.new(configuration) end
Public Instance Methods
buildTests()
click to toggle source
Builds the tests target through xctool
(see XctoolRunner) @note a configuration must be already setup for this method to work
# File lib/guardian_angel.rb, line 27 def buildTests() @runner.build() end
watch()
click to toggle source
Starts watching for changes to .m or .swift files in the caller directory
@note this uses the gem filewatcher
# File lib/guardian_angel.rb, line 34 def watch() GALogger.log("Watching...") system("filewatcher '*.{m,swift}' 'xctestfile $FILENAME'", out: $stdout, err: :out) end