From edd3970917fa1189ce49b1878f513a5f9fcfed51 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 17 Dec 2012 23:54:07 -0800 Subject: [PATCH] Fix PryTester --- lib/pry/test/helper.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/pry/test/helper.rb b/lib/pry/test/helper.rb index 7482408f..86084ca1 100644 --- a/lib/pry/test/helper.rb +++ b/lib/pry/test/helper.rb @@ -103,14 +103,11 @@ end class PryTester attr_reader :pry, :out - def initialize(context = TOPLEVEL_BINDING, options = {}) - @pry = Pry.new(options) + def initialize(target = TOPLEVEL_BINDING, options = {}) + @pry = Pry.new(options.merge(:target => target)) @history = options[:history] - if context - self.context = context - @pry.inject_sticky_locals! - end + @pry.inject_sticky_locals! @pry.input_array << nil # TODO: shouldn't need this reset_output