aboutsummaryrefslogtreecommitdiffstats
path: root/community/crystal/specs-tempdir-separate-helper.patch
blob: 9d07c0f8e6326eb7a540af2387dc35aaa99febb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 5f4c3697641654959a313a0332fbba59334f8ca3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20M=C3=BCller?= <straightshoota@gmail.com>
Date: Mon, 2 Jul 2018 12:39:25 +0200
Subject: [PATCH] Fix: Rename datapath helper to compiler_datapath for compiler specs

Patch-Source: https://github.com/crystal-lang/crystal/pull/6312
See-Also: https://github.com/crystal-lang/crystal/pull/5951#issuecomment-400986673
---
 spec/compiler/compiler_spec.cr | 4 ++--
 spec/compiler/spec_helper.cr   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/compiler/compiler_spec.cr b/spec/compiler/compiler_spec.cr
index 7fdbca20db..426a5324e0 100644
--- a/spec/compiler/compiler_spec.cr
+++ b/spec/compiler/compiler_spec.cr
@@ -4,7 +4,7 @@ require "./spec_helper"
 describe "Compiler" do
   it "compiles a file" do
     with_tempfile "compiler_spec_output" do |path|
-      Crystal::Command.run ["build", datapath("compiler_sample"), "-o", path]
+      Crystal::Command.run ["build", compiler_datapath("compiler_sample"), "-o", path]
 
       File.exists?(path).should be_true
 
@@ -13,7 +13,7 @@ describe "Compiler" do
   end
 
   it "runs subcommand in preference to a filename " do
-    Dir.cd datapath do
+    Dir.cd compiler_datapath do
       with_tempfile "compiler_spec_output" do |path|
         Crystal::Command.run ["build", "compiler_sample", "-o", path]
 
diff --git a/spec/compiler/spec_helper.cr b/spec/compiler/spec_helper.cr
index 536691a5ad..8a7e40b314 100644
--- a/spec/compiler/spec_helper.cr
+++ b/spec/compiler/spec_helper.cr
@@ -1,6 +1,6 @@
 require "../spec_helper"
 require "../support/tempfile"
 
-def datapath(*components)
+def compiler_datapath(*components)
   File.join("spec", "compiler", "data", *components)
 end