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

support a .rspec-local file #599

Closed
dchelimsky opened this issue Apr 11, 2012 · 6 comments
Closed

support a .rspec-local file #599

dchelimsky opened this issue Apr 11, 2012 · 6 comments

Comments

@dchelimsky
Copy link
Contributor

RSpec should load a local .rspec-local (name up for grabs) file if present, and it should override anything in .rspec, but not override whatever is on the command line.

This would allow dev teams to check .rspec into source control with config options everybody agrees on, but let individual developers add config options they prefer as well.

@justinko
Copy link
Contributor

Couldn't they add whatever is in the .rspec file to RSpec.configuration and leave .rspec for "local" development (to override config)?

@dchelimsky
Copy link
Contributor Author

That could work, but the trick is that .rspec is required for autotest, for example, and might be required for more things in the future. I want devs to be able to check their .rspec file in but still be able to override it locally. Make sense?

@mcmire
Copy link
Contributor

mcmire commented May 16, 2012

+1. Currently we keep a non-dot file, rspec, in our repo and then tell devs to copy this to .rspec when they clone it (actually we have a script handle this, but same thing). This would obviously make it so we didn't have to do that.

@TylerRick
Copy link

I wouldn't mind this feature being added, but in the meantime, now that .rspec supports ERB, I've been able to just throw a line like this at the end of my .rspec:

<%= local = Pathname('.rspec-local'); local.read if local.exist? %>

to have the contents of my .rspec-local appended to the end of the project's shared .rspec config. As long as the particular options you want to override are actually overridable (not all options have a matching --no-{option}, and sometimes repeated use of an option appends rather than replaces), this seems to work...

@fables-tales
Copy link
Member

I'll work on this if nobody else is.

@myronmarston
Copy link
Member

Closed by #714

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

6 participants