Description: Don't try to write outside build dir
 Change the path of pry history file inside build dir, to prevent FTBFS.

Bug-Debian: https://bugs.debian.org/759900
Forwarded: not-needed
Author: David Suárez <david.sephirot@gmail.com>
Last-Update: 2014-09-24

--- pry-0.10.1.orig/spec/regression/readline_spec.rb
+++ pry-0.10.1/spec/regression/readline_spec.rb
@@ -21,19 +21,23 @@ describe "Readline" do
   it "is loaded on invoking 'pry'" do
     code = <<-RUBY
       require "pry"
+      Pry.config.history.file = "pry_history"
       Pry.start self, input: StringIO.new("exit-all"), output: StringIO.new
       puts defined?(Readline)
     RUBY
     `#@ruby -I #@pry_dir -e '#{code}'`.end_with?("constant\n").should == true
+    File.delete "pry_history"
   end
 
   it "is not loaded on invoking 'pry' if Pry.input is set" do
     code = <<-RUBY
       require "pry"
+      Pry.config.history.file = "pry_history"
       Pry.input = StringIO.new("exit-all")
       Pry.start self, output: StringIO.new
       p defined?(Readline)
     RUBY
     `#@ruby -I #@pry_dir -e '#{code}'`.end_with?("nil\n").should == true
+    File.delete "pry_history"
   end
 end
