Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User's personal .rspec file could conflict with the test suite #60

Closed
Mange opened this issue Nov 20, 2019 · 4 comments
Closed

User's personal .rspec file could conflict with the test suite #60

Mange opened this issue Nov 20, 2019 · 4 comments

Comments

@Mange
Copy link
Contributor

Mange commented Nov 20, 2019

[EDIT:] To make it clear, this related to running this project's test suite. In my case because I wanted to contribute patches. This is not something that happens to project using this gem.

I have a ~/.rspec file that contains --color. This causes all tests to fail. Putting a .rspec file in the repo with either --no-color or nothing at all does not fix it.

Removing my ~/.rspec file causes the tests to work again.

Overriding $HOME and $XDG_CONFIG_HOME when executing rspec seems to work for me, but I wonder if there are any other dangerous effects of this.

XDG_CONFIG_HOME=/tmp HOME=/tmp SPEC_OPTS="" rspec ./spec/integration/rspec/contain_exactly_matcher_spec.rb:146

In theory, one could also refactor the runner so that color enabling isn't just set in the RSpec configuration but is also passed along to the rspec command itself. That would be more stable, even though it might still have issues with other things set up in the user's config.

@mcmire
Copy link
Collaborator

mcmire commented Nov 26, 2019

Hey! Sorry for the delay on this. I'm not exactly sure why this is happening, but I was able to reproduce this bug successfully and fix this. Give this branch/PR a shot and see if this fixes the issue for you: #62

@mcmire
Copy link
Collaborator

mcmire commented Dec 9, 2019

Just wanted to check again on this. Did that branch end up working for you?

@Mange
Copy link
Contributor Author

Mange commented Dec 11, 2019

Works for me! 👍

Sorry for not getting back to you. I must've missed the first notification.

@mcmire
Copy link
Collaborator

mcmire commented Dec 12, 2019

Sweet! Merging now.

@mcmire mcmire closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants