Closed marcgreenstock closed 5 years ago
did you mean to close #3 instead?
Yes, sorry
np :) I'll work on this issue in a few days.
It would also be good to have a matcher for description on the object type too:
it { is_expected.to have_a_description([optional description]) }
Hey @marcgreenstock, the latest master branch has a refactored version of the sub-matches of have_a_field
. It should be fairly trivial to implement the description matcher of a field on this new version. The BeOfType
class is reused in both contexts, just like you suggested we do with the description. Let me know if you're interested in doing this.
Sorry for the huge delay on this...
Closed by mistake
Closing for inactivity, let me know if you want to get back to this.
As mentioned on #8, it would be nice to have a with_description. The argument could be optional to test if a field has a description, or with an argument that the description matches. e.g.