Skip to content

Instantly share code, notes, and snippets.

@zeke
Forked from bmizerany/irb
Created October 21, 2009 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeke/215364 to your computer and use it in GitHub Desktop.
Save zeke/215364 to your computer and use it in GitHub Desktop.
blake:carealot$ irb -rubygems -r myapp.rb -r sinatra/test
irb(main):001:0> app = Sinatra::TestHarness.new(Sinatra::Application)
=> #<Sinatra::TestHarness:0x10c3d74 @app=Sinatra::Application>
irb(main):002:0> app.get '/'
=> #<Rack::MockResponse:0x10ae780 @original_headers={"Content-Type"=>"text/html", "Content-Length"=>"7"}, @status=200, @errors="", @headers={"Content-Type"=>"text/html", "Content-Length"=>"7"}, @body="testing">
irb(main):003:0> app.body
=> "testing"
require 'sinatra'
get '/' do
'testing'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment