Class: Koine::RestClient::MockFactory
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Koine::RestClient::MockFactory
- Defined in:
- lib/koine/rest_client/rspec_mock_client.rb
Overview
mock factory
Instance Method Summary collapse
- #delete(*args) ⇒ Object
- #get(*args) ⇒ Object
-
#initialize(rspec, client_proxy) ⇒ MockFactory
constructor
A new instance of MockFactory.
- #on_error(&block) ⇒ Object
- #patch(*args) ⇒ Object
- #post(*args) ⇒ Object
- #put(*args) ⇒ Object
Constructor Details
#initialize(rspec, client_proxy) ⇒ MockFactory
Returns a new instance of MockFactory.
84 85 86 87 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 84 def initialize(rspec, client_proxy) super(rspec) @client_proxy = client_proxy end |
Instance Method Details
#delete(*args) ⇒ Object
105 106 107 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 105 def delete(*args) create_mock(:delete, *args) end |
#get(*args) ⇒ Object
89 90 91 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 89 def get(*args) create_mock(:get, *args) end |
#on_error(&block) ⇒ Object
109 110 111 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 109 def on_error(&block) @client_proxy.on_error(&block) end |
#patch(*args) ⇒ Object
101 102 103 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 101 def patch(*args) create_mock(:patch, *args) end |
#post(*args) ⇒ Object
93 94 95 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 93 def post(*args) create_mock(:post, *args) end |
#put(*args) ⇒ Object
97 98 99 |
# File 'lib/koine/rest_client/rspec_mock_client.rb', line 97 def put(*args) create_mock(:put, *args) end |