Module: Waves::Mocks

Defined in:
lib/waves/runtime/mocks.rb

Instance Method Summary collapse

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

#dispatcherObject



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

#requestObject



5
# File 'lib/waves/runtime/mocks.rb', line 5

def request ; Rack::MockRequest.new( dispatcher.new ) ; end