Thanks for the answers to this, guys. I'm happily running simplecov and
have learned about the different types of coverage C0, C1 (etc).
I was initially assuming that all methods created during refactoring
should have a 'describe <methodname>' block, but after viewing Sandi
Metzler's "The Magic Tricks of Testing"[1] it seems that there's only
value in testing:
Incoming messages:
Queries - assert the result
Commands - the publicly accessible side effects
Outgoing Command messages:
Expected messages to collaborators are indeed sent correctly
Outgoing Query messages:
No point in testing - assume that the recipient tests as an incoming
message to (avoid double testing)
Messages sent to self:
Have no baring on behaviour - only test if it makes development more
efficient
I'd be interested in hearing your comments on this - especially
alternate perspectives.
Cheers all,
Tom
[1] https://speakerdeck.com/skmetz/magic-tricks-of-testing-railsconf
On 30/12/2015 2:15 PM, Tom Hale wrote:
Hi all,
In the project I'm working on, I'm noticing methods creeping in during
refactoring that aren't covered in the specks.
What workflows, practices and/or tools do you use to ensure that all
methods have a spec?
Merry New Year and Happy Christmas :)
--
You received this message because you are subscribed to the Google
Groups "Ruby or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ruby or
Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/d/optout.