Sha256: b15860f13162948bb71920d9145025bbd259ec947c72ddd89664e75f1da46cba
Contents?: true
Size: 845 Bytes
Versions: 12
Compression:
Stored size: 845 Bytes
Contents
module Retest module Runners class Runner include Observable attr_accessor :command, :stdout def initialize(command, stdout: $stdout) @stdout = stdout @command = command end def ==(obj) command == obj.command && obj.class == self.class end def run(changed_file = nil, repository: nil) system_run command end def run_all_tests(tests_string) log("Test File Selected: #{tests_string}") system_run command.gsub('<test>', tests_string) end def sync(added:, removed:) end private def system_run(command) result = system(command) ? :tests_pass : :tests_fail changed notify_observers(result) end def log(message) stdout.puts(message) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems