zeke (owner)

Fork Of

Revisions

gist: 215364 Download_button fork
public
Public Clone URL: git://gist.github.com/215364.git
Embed All Files: show embed
irb #
1
2
3
4
5
6
7
8
9
10
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"
myapp.rb #
1
2
3
4
5
require 'sinatra'
 
get '/' do
  'testing'
end