Skip to content

Instantly share code, notes, and snippets.

@alxjrvs
Last active August 29, 2015 14:01
Show Gist options
  • Save alxjrvs/730d660979f8a5e25e4c to your computer and use it in GitHub Desktop.
Save alxjrvs/730d660979f8a5e25e4c to your computer and use it in GitHub Desktop.
considered :canonical if: :remote_uuid, present: true
considered :canonical if: do
:remote_uuid, present: true
:investors, { investors > 40}
:boolean_method
end
considered :canonical if: do |obj|
obj.remote_uuid, present: true
obj.investors, { investors > 40}
obj.boolean_method
end
Methods:
test_class.canonical?
test_class.warnings? #analagous to #errors?, warnings are keyed to their respective state)
@jeremyw
Copy link

jeremyw commented May 23, 2014

That's a lot of considered :canonical if:. Seems verbose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment