3 # Sinatra Irb is entered via <tt>ruby myapp.rb -c</tt> (replace myapp.rb with your app filename)
5 # Be sure to also check out Sinatra::TestMethods for more cool stuff when your in Irb
13 Object.send(:include, TestMethods) # added to allow post_to in console
16 # Reload all Sinatra and App specific files
21 # Show the +body+ with result info in your text editor!!! Great Job!
22 def show!(editor = nil)
23 editor = editor || ENV['EDITOR']
24 IO.popen(editor, 'w') do |f|
35 def result_info #:nodoc:
38 # Headers: #{headers.inspect}
43 ARGV.clear # Avoid passing args to IRB
45 require 'irb/completion'
49 if File.exists? ".irbrc"
50 ENV['IRBRC'] = ".irbrc"