On 12 June 2013 00:08, Steven Degutis <sbdegu...@gmail.com> wrote: > Right now they both point to test2.api.asserters/*assertion-results*. But > I'd really like to get rid of the concreteness of this if possible. But even > throwing exceptions to indicate assertion results won't do, because the > specific exception class to throw/catch is still too concrete. > > Anyone have any ideas?
Use ex-info / ex-data? (NB. ex-info optionally takes a cause argument, so you can use it to wrap exceptions thrown from inside the expressions under test.) Cheers, Michał > > > On Sun, Jun 9, 2013 at 3:27 AM, Stuart Halloway <stuart.hallo...@gmail.com> > wrote: >> >> Hi Steven, >> >> A few thoughts: >> >> 1. You may want to look at >> https://github.com/clojure/test.generative/blob/master/data-model.org. >> >> 2. I don't think you want a ref for *assertion-results* -- I am not aware >> of any use cases that would need transactions. In any case the choice of >> reference type probably belongs in the impl, not the spec. >> >> Good luck with this! >> Stu >> >> >> On Sat, Jun 8, 2013 at 4:14 PM, Steven Degutis <sbdegu...@gmail.com> >> wrote: >>> >>> Test2 is a new testing lib for Clojure, where the power is its >>> simplicity, extensibility, and a SPEC much like Ring's. >>> >>> Github: https://github.com/evanescence/test2 >>> >>> Some background: It came out of discussions with the smart folks in >>> #clojure, who were frustrated with the inflexibility of existing libs, and >>> intended this to be the spiritual successor to clojure.test. We wanted >>> something that was still simple like clojure.test, but could be extended >>> externally much more easily in case you wanted features found in >>> clojure.test, Midje, Speclj, or Expectations, or whatever else. >>> >>> This is a pre-ANN because it's more of a call for extensions. I've >>> written one last night, test2-autorunner, which took about an hour. This >>> should give some idea of how easy it is and how well-designed the SPEC was >>> by the smart folks of #clojure. There are some ideas at the bottom of the >>> wiki, but of course any extensions are encouraged. >>> >>> -Steven >>> >>> -- >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clojure@googlegroups.com >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "Clojure" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to clojure+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >> >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.