Class: Jbr::Mock::Visits
- Defined in:
- lib/jbr/mock/visits.rb
Overview
The visits an app under test asked Jbr.mock to answer with.
Constant Summary
Constants inherited from Visits
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#each ⇒ Enumerator<Mock::Visit>
Every visit the app named.
-
#past ⇒ Enumerator<Mock::Visit>
Those it dated before now.
-
#upcoming ⇒ Enumerator<Mock::Visit>
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::Visit>
Returns every visit the app named.
5 |
# File 'lib/jbr/mock/visits.rb', line 5 def each(&) = mocked(Jbr.mock.visits).each(&) |
#past ⇒ Enumerator<Mock::Visit>
Returns those it dated before now.
11 |
# File 'lib/jbr/mock/visits.rb', line 11 def past = mocked Jbr.mock.visits.select { |visit| started? visit } |
#upcoming ⇒ Enumerator<Mock::Visit>
Returns those it dated from now on, and any it left undated.
8 |
# File 'lib/jbr/mock/visits.rb', line 8 def upcoming = mocked Jbr.mock.visits.reject { |visit| started? visit } |