Class: Minitest::Server
- Inherits:
-
Object
- Object
- Minitest::Server
- Defined in:
- lib/minitest/server.rb
Constant Summary collapse
- TOPDIR =
Dir.pwd + "/"
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client) ⇒ Server
constructor
A new instance of Server.
- #quit ⇒ Object
- #report ⇒ Object
- #result(file, klass, method, fails, assertions, time) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(client) ⇒ Server
Returns a new instance of Server.
23 24 25 |
# File 'lib/minitest/server.rb', line 23 def initialize client self.client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
21 22 23 |
# File 'lib/minitest/server.rb', line 21 def client @client end |
Class Method Details
.path(pid = $$) ⇒ Object
9 10 11 |
# File 'lib/minitest/server.rb', line 9 def self.path pid = $$ "drbunix:#{Dir.tmpdir}/minitest.#{pid}" end |
.run(client) ⇒ Object
13 14 15 |
# File 'lib/minitest/server.rb', line 13 def self.run client DRb.start_service path, new(client) end |
.stop ⇒ Object
17 18 19 |
# File 'lib/minitest/server.rb', line 17 def self.stop DRb.stop_service end |
Instance Method Details
#quit ⇒ Object
27 28 29 |
# File 'lib/minitest/server.rb', line 27 def quit self.class.stop end |
#report ⇒ Object
41 42 43 |
# File 'lib/minitest/server.rb', line 41 def report # do nothing end |
#result(file, klass, method, fails, assertions, time) ⇒ Object
35 36 37 38 39 |
# File 'lib/minitest/server.rb', line 35 def result file, klass, method, fails, assertions, time file = file.sub(/^#{TOPDIR}/, "") client.result file, klass, method, fails, assertions, time end |
#start ⇒ Object
31 32 33 |
# File 'lib/minitest/server.rb', line 31 def start client.failures.clear # TODO: push down to subclass end |