Class: Jbr::Mock::Visits

Inherits:
Visits show all
Defined in:
lib/jbr/mock/visits.rb

Overview

The visits an app under test asked Jbr.mock to answer with. Only the walk is mocked: narrowing a list, and reading it as records or as IDs, is the same code a real one runs.

Constant Summary

Constants inherited from Visits

Visits::FIELDS

Constants included from Listable

Listable::IDS_PAGE, Listable::PAGE

Instance Attribute Summary

Attributes inherited from Resource

#id

Instance Method Summary collapse

Methods included from Includable

#includes

Methods included from Listable

#each, #ids, #past, #upcoming

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Jbr::Resource

Instance Method Details

#find(id) ⇒ Mock::Visit

Returns the visit the app listed under that ID.

Returns:

  • (Mock::Visit)

    the visit the app listed under that ID.



6
# File 'lib/jbr/mock/visits.rb', line 6

def find(id) = Mock::Visit.new node: listed(id)