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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants