Class: Paraspec::WorkerFormatter
- Inherits:
-
Object
- Object
- Paraspec::WorkerFormatter
show all
- Defined in:
- lib/paraspec/worker_formatter.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of WorkerFormatter.
21
22
23
|
# File 'lib/paraspec/worker_formatter.rb', line 21
def initialize(output)
@master_client = output.master_client
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, args) ⇒ Object
49
50
|
# File 'lib/paraspec/worker_formatter.rb', line 49
def method_missing(m, args)
end
|
Instance Method Details
#dump_summary(notification) ⇒ Object
46
47
|
# File 'lib/paraspec/worker_formatter.rb', line 46
def dump_summary(notification)
end
|
#example_failed(notification) ⇒ Object
74
75
76
|
# File 'lib/paraspec/worker_formatter.rb', line 74
def example_failed(notification)
example_notification(notification)
end
|
#example_notification(notification) ⇒ Object
64
65
66
67
68
69
70
71
72
|
# File 'lib/paraspec/worker_formatter.rb', line 64
def example_notification(notification)
spec = {
file_path: notification.example.metadata[:file_path],
scoped_id: notification.example.metadata[:scoped_id],
}
execution_result = notification.example.execution_result
@master_client.request('example-passed',
spec: spec, result: execution_result)
end
|
#example_passed(notification) ⇒ Object
60
61
62
|
# File 'lib/paraspec/worker_formatter.rb', line 60
def example_passed(notification)
example_notification(notification)
end
|
#example_pending(notification) ⇒ Object
78
79
80
|
# File 'lib/paraspec/worker_formatter.rb', line 78
def example_pending(notification)
example_notification(notification)
end
|
#example_started(notification) ⇒ Object
52
53
54
55
56
57
58
|
# File 'lib/paraspec/worker_formatter.rb', line 52
def example_started(notification)
spec = {
file_path: notification.example.metadata[:file_path],
scoped_id: notification.example.metadata[:scoped_id],
}
@master_client.request('notify-example-started', spec: spec)
end
|
#start(notification) ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/paraspec/worker_formatter.rb', line 25
def start(notification)
end
|
#stop(notification) ⇒ Object
41
42
43
44
|
# File 'lib/paraspec/worker_formatter.rb', line 41
def stop(notification)
end
|