Class: Minitest::Server
- Inherits:
-
Object
- Object
- Minitest::Server
- Defined in:
- lib/minitest/server.rb
Constant Summary collapse
- VERSION =
"1.0.8"
- 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.
24 25 26 |
# File 'lib/minitest/server.rb', line 24 def initialize client self.client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
22 23 24 |
# File 'lib/minitest/server.rb', line 22 def client @client end |
Class Method Details
.path(pid = $$) ⇒ Object
10 11 12 |
# File 'lib/minitest/server.rb', line 10 def self.path pid = $$ "drbunix:#{Dir.tmpdir}/minitest.#{pid}" end |
.run(client) ⇒ Object
14 15 16 |
# File 'lib/minitest/server.rb', line 14 def self.run client DRb.start_service path, new(client) end |
.stop ⇒ Object
18 19 20 |
# File 'lib/minitest/server.rb', line 18 def self.stop DRb.stop_service end |
Instance Method Details
#quit ⇒ Object
28 29 30 |
# File 'lib/minitest/server.rb', line 28 def quit self.class.stop end |
#report ⇒ Object
42 43 44 |
# File 'lib/minitest/server.rb', line 42 def report # do nothing end |
#result(file, klass, method, fails, assertions, time) ⇒ Object
36 37 38 39 40 |
# File 'lib/minitest/server.rb', line 36 def result file, klass, method, fails, assertions, time file = file.sub(/^#{TOPDIR}/, "") client.minitest_result file, klass, method, fails, assertions, time end |
#start ⇒ Object
32 33 34 |
# File 'lib/minitest/server.rb', line 32 def start client.minitest_start end |