1. require 'bundler/setup'
  2. Bundler.require(:default)
  3.  
  4.  
  5. def app
  6. proc do |env|
  7. [200, { 'Content-Type' => 'text/html' }, 'Hello simple rack application!']
  8. end
  9. end
  10.  
  11.  
  12. require 'rack/test'
  13. RSpec.configure do |config|
  14. config.include Rack::Test::Methods
  15. end
  16.  
  17.  
  18. describe 'example' do
  19. it 'should not run out of memoery' do
  20. get '/'
  21.  
  22. last_response.should_not be_nil
  23. end
  24.  
  25. it 'should not run out of memoery' do
  26. get '/'
  27.  
  28. last_response.should == 'egg'
  29. end
  30. end