Class: Jbr::Mock::Jobs
Overview
The jobs an app under test asked Jbr.mock to answer with.
Constant Summary
Constants inherited from Jobs
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#each ⇒ Enumerator<Mock::Job>
Every job the app named.
-
#find(id) ⇒ Mock::Job
The job filed under that ID where the app listed one, and otherwise the single job it named — which is every app that mocks a lookup without mocking a list.
-
#past ⇒ Enumerator<Mock::Job>
Those it dated before now.
-
#upcoming ⇒ Enumerator<Mock::Job>
Those it dated from now on, and any it left undated.
Methods included from Includable
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Jbr::Resource
Instance Method Details
#each ⇒ Enumerator<Mock::Job>
Returns every job the app named.
10 |
# File 'lib/jbr/mock/jobs.rb', line 10 def each(&) = mocked(Jbr.mock.jobs).each(&) |
#find(id) ⇒ Mock::Job
The job filed under that ID where the app listed one, and otherwise the single job it named — which is every app that mocks a lookup without mocking a list.
7 |
# File 'lib/jbr/mock/jobs.rb', line 7 def find(id) = Mock::Job.new node: listed(id) || Jbr.mock.job |