-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add support to verify touch option #246
Add support to verify touch option #246
Conversation
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 think we want with_touch
(assumes true), with_touch(true)
, with_touch(false)
. Add tests for each combination.
Questions:
- Does
touch
appear inwith_options
? Add tests/examples/README. - Is touch always set/never set, meaning do we need to treat absence of
touch: true/false
differently?
README.md
Outdated
@@ -256,6 +256,11 @@ RSpec.describe Article do | |||
it { is_expected.to embed_many(:comments) } | |||
end | |||
|
|||
# when the touch option is provided, then we can also verify that it is set. |
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.
match other descriptions' style
"can also verify that touch is set"
Great suggestion. Let me incorporate the feedback. Does Is touch always set/never set, meaning do we need to treat absence of I think it ultimately depends on the association. Based on mongoid's documentation for |
10894bf
to
264e1c6
Compare
@dblock - While implementing the suggested changes, I stumbled upon a few things. Specifying the I worked around this by requiring the parent class in the child that defines the Thoughts on this? I also pushed an updated changeset for review. |
add support with with_touch matcher add support for touch matcher Update readme revert section of readme push tests update changelog require classes as the touch options requires that parent classes are loaded before the child update documentation generate appraisal files fix rubocop remove version on debug dev dependency remove debug as a dev dependency update readme remove require debug remove commented out code update version remove test on comment
c472821
to
ef72704
Compare
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.
Looks nice and clean! Fix up the version change and it's good to go.
@sairamsrinivasan Thank you for this and #245. Any interest in helping with this gem? (see #237) Maybe making the next release could be a start? If yes, email me dblock at dblock dot org with your rubygems login |
@dblock Thanks for reviewing and merging this PR. I’d be more than happy to help with this gem. I’ll follow up through email when I get the chance. |
This PR adds support to verify touch options in rspec