On Dec 7, 8:51 am, Stuart Sierra <[EMAIL PROTECTED]> wrote: > 2. Nested test contexts, as in RSpec and some other testing > frameworks. >
I would wholeheartedly love if tests could be nested. Even if it was as simple as appending a phrase to each nested test: (defcontext "str-starts-with?" (deftest "returns-true-when-subject-starts-with-prefix" (is (str-starts-with? "abcd" "abc"))) (deftest "returns-false-when-subject-does-not-start-with-prefix" (is (not (str-starts-with? "abcd" "123")))) (deftest "throws-arg-exception-when-subject-is-not-string" (is (thrown? IllegalArgumentException (str-starts-with? 123))))) ...being equivalent to defining tests called "str-starts-with?-returns- true-when-subject-starts-with-prefix", "str-starts-with?-returns-false- when-subject-does-not-start-with-prefix", and "str-starts-with?-throws- arg-exception-when-subject-is-not-string". As you can see, I write long names for test names. Nested test contexts like RSpec would be great. --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---