Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 29th, 2012  |  syntax: None  |  size: 0.46 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data