pezra / rspec-mode

An RSpec minor mode for Emacs
257 stars 112 forks source link

Check files are not directories for Gemfile, Rakefile, Berksfile #196

Closed destinf closed 2 years ago

destinf commented 2 years ago

I think this is a rare case but I ran into an issue at $WORK where there is a Gemfile directory in the spec folder. I don't think that Gemfiles, Rakefiles and Berksfiles can be directories.

This PR attempts to only look for files with the above names rather than both files and directories.

dgutov commented 2 years ago

Hi! Thanks for the patch.

Instead of two calls, we could probably use file-regular-p. Could you try that?

destinf commented 2 years ago

Thank you for the recommendation, my knowledge of elisp is fairly narrow. It looks like it works with file-regular-p so I've updated the PR.