Cross Reference: shared_helper.rb
xref
: /
ontohub
/
spec
/
support
/
shared_helper.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
elasticsearch_port
=
ENV
[
'ELASTIC_TEST_PORT'
].
present
? ?
ENV
[
'ELASTIC_TEST_PORT'
] :
'9250'
Elasticsearch
::
Model.client
=
Elasticsearch
::
Client.new
host
:
"localhost:#{elasticsearch_port}"
# Recording HTTP Requests
VCR.configure
do
|c|
c.cassette
_library_dir
=
'
spec
/
fixtures
/
vcr
'
c.hook
_into
:
webmock
c.ignore
_localhost
=
true
c.ignore
_request
do
|
request
|
# ignore elasticsearch requests
URI
(
request.uri
)
.
host
==
'localhost'
&&
URI
(
request.uri
)
.
port
==
elasticsearch_port.to
_i
end
c.register
_request_matcher
:
hets_prove_uri
do
|
request1
,
request2
|
hets_prove_matcher
(
request1
,
request2
)
end
end