Permalink
Browse files

ERR: Irb only methods belong in irb only.

  • Loading branch information...
Blake Mizerany
Blake Mizerany committed Oct 4, 2007
1 parent b767275 commit 7ada49e85feb6cee42a6fb203b872981bedf1417
Showing with 13 additions and 13 deletions.
  1. +12 −0 lib/sinatra/irb.rb
  2. +1 −13 lib/sinatra/test_methods.rb
View
@@ -11,6 +11,18 @@ def start!
def reload!
Loader.reload!
end
+
+ def show!(editor = nil)
+ editor = editor || ENV['EDITOR']
+ IO.popen(editor, 'w') do |f|
+ f.puts "<!--"
+ f.puts result_info
+ f.puts "-->"
+ f.puts
+ f.puts body
+ end
+ end
+ alias :mate :show!
end
ARGV.clear # Avoid passing args to IRB
@@ -13,19 +13,7 @@ def #{verb}_it(path, params = {})
end
end_eval
end
-
- def show!(editor = nil)
- editor = editor || ENV['EDITOR']
- IO.popen(editor, 'w') do |f|
- f.puts "<!--"
- f.puts result_info
- f.puts "-->"
- f.puts
- f.puts body
- end
- end
- alias :mate :show!
-
+
def result_info
info = <<-end_info
# Status: #{status}

0 comments on commit 7ada49e

Please sign in to comment.