summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2022-03-05 20:58:51 -0300
committerAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2022-03-05 21:49:48 -0300
commit9d93264e90836e88d2b7769357e8ede70c8ce89f (patch)
tree0fa1ce9fed825d1913666aabe9c18c96d74a6a2d
parent3a50062dfcb2f5474376fb4c7b5f6d1473c6a09f (diff)
downloadpry-9d93264e90836e88d2b7769357e8ede70c8ce89f.tar.gz
Ensure files are not shell escaped on windows tests
-rw-r--r--spec/editor_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/editor_spec.rb b/spec/editor_spec.rb
index 68297f3f..2005bf1c 100644
--- a/spec/editor_spec.rb
+++ b/spec/editor_spec.rb
@@ -72,7 +72,11 @@ describe Pry::Editor do
end
end
- describe "build_editor_invocation_string", skip: !Pry::Helpers::Platform.windows? do
+ describe "build_editor_invocation_string" do
+ before do
+ allow(Pry::Helpers::Platform).to receive(:windows?).and_return(false)
+ end
+
it 'should shell-escape files' do
invocation_str = @editor.build_editor_invocation_string(@tf_path, 5, true)
expect(invocation_str).to match(/#{@tf_dir}.+hello\\ world\.rb/)