-
Notifications
You must be signed in to change notification settings - Fork 27
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
Moved Grammar unit tests #67
Conversation
spec/spec_helper.rb
Outdated
Kernel.srand config.seed | ||
|
||
# Allow to limit the run of the specs | ||
config.filter_run_when_matching :focus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attention point for having this enabled is that if someone forgets the focus on the code, then this would be a problem since most of the tests would be skipped.
So I'd like your opinion on this matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to NOT set this configuration because it's risky and costly to check each PR does not introduce focus method (e.g. fit
). Could you remove this configuration?
spec/lrama/grammar/code_spec.rb
Outdated
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add new line on the end of a file.
spec/spec_helper.rb
Outdated
|
||
# Randomize specs run order. | ||
config.order = :random | ||
Kernel.srand config.seed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this code bit tricky. I guess the intention is to fix seed of Kernel#rand. However IIRC at the moment there is no dependency for such randomness.
- Moved and renamed file from `spec/lrama/grammar_spec.rb` to `spec/lrama/grammar/symbol_spec.rb` - Added randomization to rspec tests and option to allow focusing test cases
- Removed extra describe - Changed to use described_class instead
f668c48
to
2f905d8
Compare
Thank you!! |
Main Changes
Commit
Commit
RSpec.describe Lrama::Grammar do
)described_class
instead ofLrama::Grammar::Symbol
Commit