Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Add support for running Rake task in a clean environment #2632

Merged
merged 5 commits into from
Jun 12, 2019

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented May 28, 2019

No description provided.

@JonRowe JonRowe force-pushed the add-isolated-env-for-rake branch 5 times, most recently from c6a3e1e to e83af48 Compare May 28, 2019 18:12
@JonRowe JonRowe force-pushed the add-isolated-env-for-rake branch from ce01d93 to 276e38b Compare May 28, 2019 19:06
@JonRowe JonRowe requested a review from benoittgt May 28, 2019 19:32
Copy link
Member

@benoittgt benoittgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Jon

task.with_clean_environment = true
task.ruby_opts = '-e "puts \"Environment: #{ENV.keys}\""'
task.run_task false
}.to avoid_outputting.to_stderr.and output(essential_shell_variables).to_stdout_from_any_process
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nice test. :)

@JonRowe JonRowe merged commit 2800fe1 into master Jun 12, 2019
@JonRowe JonRowe deleted the add-isolated-env-for-rake branch June 12, 2019 08:05
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this pull request Oct 30, 2020
Add support for running Rake task in a clean environment
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this pull request Oct 6, 2021
…ed-env-for-rake

Add support for running Rake task in a clean environment

---
This commit was imported from rspec/rspec-core@2800fe1.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants