Fail fast and show an error if no spec files are found#158
Fail fast and show an error if no spec files are found#158MarkVillacampa wants to merge 1 commit intoHipByte:masterfrom MarkVillacampa:spec-error-msgs
Conversation
|
I'm not 100% convinced of the error message. If accepted, message suggestions are welcome. |
|
Good idea, might the best message simply be "No specs found"? |
|
This problem also arises if you happen to run Unsure if I should change up #208 to match how its done here or just wait on this to be merged since it existed before and solves the problem - but has been out here for almost a year. |
If there are no spec files, when running
rake spec, the app will crash at runtime with this error message:Since new Rubymotion projects come with a
main_spec.rbsample spec, this will not be a common problem. However this can be very helpful when using thefilesenv variable to select only some spec files (I run into this all the time).The previous error will still happen if we have empty spec files. This could be solved by checking at runtime if
@contextsis empty inspec.rb. But I'm not sure if this is recommended/necessary.