atom-ruby-test icon indicating copy to clipboard operation
atom-ruby-test copied to clipboard

Overwrites spec files white space if using Whitespace package

Open lacostenycoder opened this issue 8 years ago • 1 comments

When I run the spec with the keyboard shortcuts, it runs the spec but it's modifying the actual spec file. Here's a screen shot from the git diff of what changed, it appears to add and delete a blank line:

screen shot 2017-03-15 at 11 10 18 am

Apparently running spec on a file triggers a save on the current file. I tested with disable whitespace package and didn't get this behavior. Not sure if this is by design but it would be nice if there were a setting to disable auto-saving a file, thought I guess that's useful too. Can that be an option? It's a habit for me to save a file's changes before trying to run it 😁 . However, I don't need to save a file I have not changed. Maybe git diff the file before deciding it needs a save?

lacostenycoder avatar Mar 15 '17 15:03 lacostenycoder

@lacostenycoder I think the best solution is to not auto-save the file if there are no changes. No need for a new setting, and everybody should be happy.

moxley avatar Mar 28 '17 20:03 moxley