From 819dfbfefb05fb272cafdccf37ebbe02b320d29c Mon Sep 17 00:00:00 2001 From: Raimo Radczewski Date: Fri, 24 May 2024 16:28:09 +0200 Subject: [PATCH] Use ruby script to print env variables (works around win vs. linux shell syntax) --- fixtures/environment.rb | 1 + fixtures/environment/smoke.yaml | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 fixtures/environment.rb diff --git a/fixtures/environment.rb b/fixtures/environment.rb new file mode 100644 index 0000000..6d5254b --- /dev/null +++ b/fixtures/environment.rb @@ -0,0 +1 @@ +ARGV.each { |arg| puts ENV[arg] } diff --git a/fixtures/environment/smoke.yaml b/fixtures/environment/smoke.yaml index 5864c4f..a3701cc 100644 --- a/fixtures/environment/smoke.yaml +++ b/fixtures/environment/smoke.yaml @@ -1,38 +1,41 @@ +command: + - ruby + - fixtures/environment.rb + tests: - name: environment environment: TEST_ENV: "test-value" - command: | - echo $TEST_ENV + args: + - TEST_ENV stdout: | test-value - name: inherits - command: | - echo $ONLY_DEFINED_IN_SPEC + args: + - ONLY_DEFINED_IN_SPEC stdout: | defined_in_spec - name: overwrites environment: OVERWRITE_IN_FIXTURE: "overwritten" - command: | - echo $OVERWRITE_IN_FIXTURE + args: + - OVERWRITE_IN_FIXTURE stdout: | overwritten - name: not-defined - command: | - echo $NOT_DEFINED + args: + - NOT_DEFINED stdout: "\n" - name: spec-is-merged-into-fixture-not-replaced environment: OVERWRITE_IN_FIXTURE: "overwritten" - command: | - echo $OVERWRITE_IN_FIXTURE - echo $ONLY_DEFINED_IN_SPEC + args: + - OVERWRITE_IN_FIXTURE + - ONLY_DEFINED_IN_SPEC stdout: | overwritten defined_in_spec -