Skip to content

Instantly share code, notes, and snippets.

@quirkey
Forked from bmizerany/irb
Created Apr 22, 2009
Embed
What would you like to do?
[08:48 AM:gist-99771(master)] $ irb -rubygems -r myapp.rb -r rack/test
>> app = Rack::Test::Session.new(Sinatra::Application)
=> #<Rack::Test::Session:0x17e8820 @headers={}, @app=Sinatra::Application>
>> app.get '/'
=> #<Rack::Response:0x17ad4dc @block=nil, @writer=#<Proc:0x0189f7b4@/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/response.rb:24>, header{"Content-Type"=>"text/html", "Content-Length"=>"7"}, body["testing"], length7, status200
>> app.body
NoMethodError: undefined method `body' for #<Rack::Test::Session:0x17e8820>
from (irb):3
>> app.last_response.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