Skip to content

Releases: clojure-expectations/expectations

Release 2.1.10

21 Dec 01:08
Compare
Choose a tag to compare

This is a maintenance release of Expectations that add two new helper functions for expectations:

  • approximately -- (approximately 42.0) returns a predicate that will test if its argument is "close" to 42.0; by default, that closeness is within 0.001 but you can call approximately with two arguments to provide a different delta value.
  • functionally -- (functionally f1 f2) returns a predicate that will test if (f1 arg) is equal to (f2 arg); you can optionally provide a third argument that can be invoked with the two different results and should return a string explaining how/why they are different (the default is to just say "not functionally equivalent").

In addition, a number of bugs in ClojureScript support were fixed.

2.2.0 RC 3

26 Oct 22:29
Compare
Choose a tag to compare

Restores most of Expectations' explanatory test output on top of clojure.test (by synthesizing an elaborate :message value). Still needs list failure handling added from in tests.

Improves line number reporting by implementing expect as a macro directly in expectations.clojure.test -- this is a potentially breaking change depending on how you are using this namespace:

  • If you are :referring :all, you'll pick up the new expect macro automatically.
  • If you are also :referring :all of expectations as well, that will break -- but all public symbols from expectations are now available in expectations.clojure.test so you no longer need expectations at all.
  • If you are :referring in just defexpect, you'll need to add expect as well.

2.2.0 RC 2

26 Oct 02:36
Compare
Choose a tag to compare

Reimplement clojure.test compatibility on top of do-report instead of report to support test harnesses that monkey patch the former (such as Cursive).

Cursive test integration now shows pass/fail in the editor. You cannot yet "run test under caret".

I hope to address the line numbering issue before "gold" release.

2.2.0 RC 1

09 Sep 21:08
Compare
Choose a tag to compare

Adds new expecting macro, based on clojure.test/testing to help make tests more descriptive.

2.2.0 Beta 3

12 Aug 01:40
Compare
Choose a tag to compare

Adds the ability to generate a readme.clj test file from a specified README file.

Specify the system property expectations.readme or the environment variable EXPECTATIONS_README to identify the README file -- in project.clj, you'll see examples.md identified via the system property.

Optionally specify the output folder via the system property expectations.test.path or the environment variable EXPECTATIONS_TEST_PATH. It defaults to test -- in project.clj, you'll see test/clojure identified via the system property.

If the README file is newer than readme.clj in the output folder -- or the latter does not exist -- then Expectations will generate readme.clj from that file, maintaining line numbers (hopefully!), and then require the new test file (so that it is run as part of the test suite). If readme.clj is newer, it will just be treated as a normal test file.

A new expectations/readme function has been added with can be invoked by tooling with the file path of the input (README) file and the folder path where readme.clj should be written. If this function is invoked with no arguments -- which happens when the expectations namespace is loaded! -- it uses the system properties and environment variables (above) to determine the input file path and output file path.

2.2.0 Beta 2

25 Jul 22:49
Compare
Choose a tag to compare

Rewrote the defexpect expansion of expect forms to allow nested use and other, non-expect code per #90.

2.2.0 Beta 1

23 Feb 20:32
Compare
Choose a tag to compare

Adds functionally predicate #88 and cleans up readme/changelog. The clojure.test support is working well at World Singles so I'd like it to get more widespread usage now as a Beta.

2.2.0 Alpha 1

01 Feb 19:01
Compare
Choose a tag to compare

Adds expectations.clojure.test namespace and support for clojure.test tooling. See https://clojure-expectations.github.io/clojure-test.html for details.