You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are no spec files, when running rake spec, the app will crash at runtime with this error message:
2014-05-12 19:06:02.608 App[69351:70b] *** Terminating app due to uncaught exception 'NoMethodError', reason: 'spec.rb:476:in `current_context': undefined method `[]' for nil:NilClass (NoMethodError)
Since new Rubymotion projects come with a main_spec.rb sample spec, this will not be a common problem. However this can be very helpful when using the files env 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 @contexts is empty in spec.rb. But I'm not sure if this is recommended/necessary.
This problem also arises if you happen to run rake spec files "blah blah blah" when "blah blah blah" happens to be an incorrect path or filename (due to typo, etc). So in that case it would be nice to tell them what files they tried to run, but were incorrect. I put together a PR for the same thing without seeing this here, but was trying to figure out how to report what files were the problem. This seems to be the perfect place for that.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.