-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adding list of existing files to failure message #44
Comments
Hey @danascheider. Yeah, sounds good. I'd be happy to accept a PR for that. |
Cool, I'll work on it! Thanks! |
I started working on this and realized it'd be easier to submit a PR to Rails instead since Rails code defines the matcher. If they're willing to accept the PR, I'll do that. The only issue with that is, it'd only change the behavior of this gem for people using the next release of Rails. If you think this would be useful to others, I can still make it work in generator_spec so it'd be there for everyone but wanted to get your thoughts on this as it might involve some monkey patching, which we'd obviously rather avoid if possible. |
Hi there! I had an idea for a feature that would be useful and wanted to ask if it's something you'd accept a PR for.
I'm running some generator specs and getting failures. I'm noticing it would be really useful to have a message like, "Expected file ___ to exist, but does not. Existing files in this location were..." and a list.
My use case is that I have a Rails 5 app that connects to two databases, so I have a separate migration generator for the second DB. Like the regular Rails migration generator, these migrations have timestamps in the filename, making it hard to use
assert_file
since I don't exactly know what the timestamp will be. Not seeing a list of files in the location makes it hard to know if no file was created or if it just had a different filename from the expected one.To give you an idea, this is what my tests looked like:
Is this a feature you'd be interested in adding? If so, I can work on it and submit a PR.
The text was updated successfully, but these errors were encountered: