Module: MockServer::Methods

Defined in:
lib/mock_server.rb

Instance Method Summary collapse

Instance Method Details

#mock_server(*args, &block) ⇒ Object



27
28
29
30
31
# File 'lib/mock_server.rb', line 27

def mock_server(*args, &block)
  app = Class.new(Sinatra::Base)
  app.class_eval(&block)
  @server = MockServer.new(app, *args, &block).start
end