Permalink
Browse files

Remove old IRB hacks, prefer pry for debugging

  • Loading branch information...
1 parent efef0e0 commit f735d5506ed9b6dca5848bab32323827dceea7ab @nertzy nertzy committed Apr 2, 2013
Showing with 0 additions and 42 deletions.
  1. +0 −42 spec/spec_helper.rb
View
@@ -106,45 +106,3 @@ def load_sql(filename)
t.text :content
t.timestamps
end
-
-require 'irb'
-
-class IRB::Irb
- alias initialize_orig initialize
- def initialize(workspace = nil, *args)
- default = IRB.conf[:DEFAULT_OBJECT]
- workspace ||= IRB::WorkSpace.new default if default
- initialize_orig(workspace, *args)
- end
-end
-
-# Drop into an IRB session for whatever object you pass in:
-#
-# class Dude
-# def abides
-# true
-# end
-# end
-#
-# console_for(Dude.new)
-#
-# Then type "quit" or "exit" to get out. In a step definition, it should look like:
-#
-# When /^I console/ do
-# console_for(self)
-# end
-#
-# Also, I definitely stole this hack from some mailing list post somewhere. I wish I
-# could remember who did it, but I can't. Sorry!
-def console_for(target)
- puts "== ENTERING CONSOLE MODE. ==\nType 'exit' to move on.\nContext: #{target.inspect}"
-
- begin
- oldargs = ARGV.dup
- ARGV.clear
- IRB.conf[:DEFAULT_OBJECT] = target
- IRB.start
- ensure
- ARGV.replace(oldargs)
- end
-end

0 comments on commit f735d55

Please sign in to comment.