Releases: waterlink/spec2.cr
0.8.2: Be or not to be
0.8.1: This Release is Type Safe
- Add type annotations, where new compiler would require them
- Fix minor type anomalies, that have popped up as instance/class vars got annotated
0.8.0: After the Big Rewrite
- Makes
after { ... }
anddelayed { ... }
hooks to run even in case of assertion failure.
v0.7.1: The Big Rewrite
This patch release makes elapsed time functionality available for usage in custom reporters as ::Spec2::ElapsedTime
. Additionally, it fixes the problem with elapsed time, when test suite takes more than one hour.
v0.7.0: Estimates
This minor release adds elapsed time output for standard reporters.
v0.6.0: Delayed Release
This minor release adds new DSL component delayed { ... }
. It is used inside of it ".." { ... }
block and its block will be executed after test example execution and after all after { ... }
hooks execution. Hence the name: Delayed.
v0.5.0: Composable
This minor release changes all exposed abstract interfaces to use composition instead of inheritance.
v0.4.2: Next DSL
This patch release re-implements existing DSL to match up breaking changes from compiler version upgrade.
v0.4.1
v0.4.0
This release includes basic ground required to actually start use this library for any test suite.
Features:
expect().to ...
syntax by default with option to enableshould
onObject
.- no global scope pollution with
Spec2.describe
+ option to enable globaldescribe
DSL. describe
,context
,it
DSL for defining examples and example groups.before
andafter
hooks to be executed before and after each example in current and nested example groups.let
,let!
,subject
andsubject!
for defining example-group-scoped bindings.- minimal necessary list of builtin matchers (matches stdlib's
spec
list). - random order execution.
- color and no-color output.
- minimal and documentation reporters.
- ability to configure almost every piece of library by using custom runner, order, reporter and/or output.
- ability to register your own matchers.
List of implemented builtin matchers:
eq("hello, world")
- asserts actual is equal to expectedraise_error(ErrorClass [, message_matcher])
- checks if block raises expected errorbe(42)
- asserts actual is the same as expectedmatch(/hello .+/)
- asserts actual is matching provided regexpbe_true
- asserts actual is equal truebe_false
- asserts actual is equal falsebe_truthy
- asserts actual is not nil or falsebe_falsey
- asserts actual is nil or falsebe_nil
- asserts actual is equal nilbe_close(42, 0.01)
- asserts actual is in delta-proximity of expectedexpect(42).to_be < 45
- asserts arbitrary method call on actual to be truthybe_a(String)
- asserts actual to be of expected type (uses is_a?)