Module: Waves::Mocks
- Defined in:
- lib/waves/runtime/mocks.rb
Instance Method Summary collapse
- #delete(uri, opts = {}) ⇒ Object
- #dispatcher ⇒ Object
- #env(uri, opts) ⇒ Object
- #get(uri, opts = {}) ⇒ Object
- #head(uri, opts = {}) ⇒ Object
- #post(uri, opts = {}) ⇒ Object
- #put(uri, opts = {}) ⇒ Object
- #request ⇒ Object
Instance Method Details
#delete(uri, opts = {}) ⇒ Object
10 |
# File 'lib/waves/runtime/mocks.rb', line 10 def delete( uri, opts = {} ) ; request.delete( uri, opts ) ; end |
#dispatcher ⇒ Object
4 |
# File 'lib/waves/runtime/mocks.rb', line 4 def dispatcher ; Waves::Dispatchers::Default ; end |
#env(uri, opts) ⇒ Object
6 |
# File 'lib/waves/runtime/mocks.rb', line 6 def env( uri, opts ) ; Rack::MockRequest.env_for( uri, opts ) ; end |
#get(uri, opts = {}) ⇒ Object
7 |
# File 'lib/waves/runtime/mocks.rb', line 7 def get( uri, opts = {} ) ; request.get( uri, opts ) ; end |
#head(uri, opts = {}) ⇒ Object
11 |
# File 'lib/waves/runtime/mocks.rb', line 11 def head( uri, opts = {} ) ; request.request( 'HEAD', uri, opts ) ; end |
#post(uri, opts = {}) ⇒ Object
9 |
# File 'lib/waves/runtime/mocks.rb', line 9 def post( uri, opts = {} ) ; request.post( uri, opts ) ; end |
#put(uri, opts = {}) ⇒ Object
8 |
# File 'lib/waves/runtime/mocks.rb', line 8 def put( uri, opts = {} ) ; request.put( uri, opts ) ; end |
#request ⇒ Object
5 |
# File 'lib/waves/runtime/mocks.rb', line 5 def request ; Rack::MockRequest.new( dispatcher.new ) ; end |