From 341c19f8ef6d247bc35f1dd3adef8fa9babf807b Mon Sep 17 00:00:00 2001 From: Andrew Vos Date: Sun, 20 Jul 2014 00:13:30 +0100 Subject: [PATCH] Fix test that fails in docker This test fails because it's not using File.join on ENV["HOME"] (which is null when run under root in docker) which means that we're asserting on the direction "//test_history" instead of "/test_history". --- spec/history_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/history_spec.rb b/spec/history_spec.rb index 112052d0..d782f115 100644 --- a/spec/history_spec.rb +++ b/spec/history_spec.rb @@ -163,7 +163,7 @@ describe Pry do error = Class.new(RuntimeError) File.expects(:open). - with("#{ENV['HOME']}/test_history", 'a', 0600). + with(File.join(ENV['HOME'].to_s, "/test_history"), 'a', 0600). raises(error) -> { history.push 'a line' }.should.raise(error)