Commit graph

1642 commits

Author SHA1 Message Date
Michael Miller
45f0f7f6d1 Include predicate arguments in label 2019-06-01 23:06:39 -06:00
Michael Miller
36f53d82db Use label from matcher macro 2019-06-01 22:53:12 -06:00
Michael Miller
7e73ec2fe1 Allow passing arguments to predicate matcher 2019-06-01 22:46:06 -06:00
Michael Miller
d969b0557a Update version to 0.8.0 2019-06-01 22:27:51 -06:00
Mike Miller
2eb6bc4ea2 Merge branch 'type-matcher-actual-fix' into 'release/0.8'
Fix the actual type reported by the type matcher

See merge request arctic-fox/spectator!5
2019-06-02 03:37:41 +00:00
Michael Miller
e234ac2f31 Test case to ensure runtime type is reported 2019-06-01 20:55:29 -06:00
Michael Miller
cc4ab9756a Fix the actual type reported by the type matcher
If an object has a difference between compiler and runtime type, then 
the type matcher would report the actual as the compiler type.
The match would be successful, because it uses the runtime check 
(is_a?).
2019-06-01 20:48:24 -06:00
Mike Miller
b6ac736dd2 Merge branch 'issue-11-fix' into 'master'
Issue 11 fix

Closes #11

See merge request arctic-fox/spectator!4
2019-06-02 02:12:24 +00:00
Michael Miller
c744120e91 Update version to 0.7.2 2019-06-01 20:10:27 -06:00
Michael Miller
ca564619ad Change example wrapper type to a class
Fixes issue #11.
Variables (defined with let) were getting re-created between the hooks 
and the example code.
This was due to a separate struct value being returned for each fetch to 
the wrapped example instance.
In turn, the wrappers for variables were reset for each fetch.
2019-06-01 20:10:08 -06:00
Mike Miller
ed2614da22 Merge branch 'named-subject-fix' into 'master'
Named subject fix

See merge request arctic-fox/spectator!3
2019-05-21 19:48:30 +00:00
Michael Miller
64a3a81b15 Update version to 0.7.1 2019-05-21 13:45:39 -06:00
Michael Miller
01b5d71ad0 Fixed an issue where named subjects could crash the compiler
Received:

Nil assertion failed (NilAssertionError)
  from ???
  ...
Error: you've found a bug in the Crystal compiler. ...

for this code:

subject(point) { Point.new }
describe "#x" do
  subject { point.x }
end

Redefining subjects with a named subject broke.
This commit fixes that with a simply flip in the definitions.
2019-05-21 13:44:19 -06:00
Michael Miller
ec9e598882 Update version to 0.7.0 2019-05-16 18:25:12 -06:00
Michael Miller
77307f6eb1 Split part of RangeMatcher off as CollectionMatcher
Use CollectionMatcher for `be_within`.
The `#of` method creates a RangeMatcher.
2019-05-16 18:20:08 -06:00
Michael Miller
fa5c13df0e Remove min-max variation of be_within
Use `be_between(min, max)` instead.
This matches RSpec.
2019-05-16 18:09:21 -06:00
Michael Miller
0fc28241dd Add be_between matcher which is an alias of be_within 2019-05-14 21:50:09 -06:00
Mike Miller
29abe79809 Merge branch 'equality-matcher-changes' into 'master'
Equality matcher changes

See merge request arctic-fox/spectator!2
2019-05-09 01:21:22 +00:00
Michael Miller
7e20521030 Bump to 0.6.0
Breaking change with be() and match()
2019-05-08 17:02:30 -06:00
Michael Miller
2378594c5d Use reference matching for be() 2019-05-08 16:59:59 -06:00
Michael Miller
f53bc26c28 Add ReferenceMatcher type 2019-05-08 16:59:36 -06:00
Michael Miller
7168b26218 Remove regex matcher - use case matcher 2019-05-08 16:39:00 -06:00
Mike Miller
e4ec47f413 Merge branch 'exception-matcher-args-fix' into 'master'
Exception matcher args fix

Closes #4

See merge request arctic-fox/spectator!1
2019-05-08 21:27:56 +00:00
Michael Miller
725f83ebca Bump version to 0.5.3 2019-05-08 15:22:51 -06:00
Michael Miller
6d81e26298 Fix for issue #4 2019-05-08 15:22:32 -06:00
Michael Miller
e5ad6fc514 Bump version to 0.5.2 2019-04-22 20:29:35 -06:00
Michael Miller
8480349ff0 Force after_all hooks to run on fail-fast
Resolves issues #2.
2019-04-22 20:29:02 -06:00
Michael Miller
00045ba9be Tests for nested groups and fail-fast 2019-04-22 20:27:54 -06:00
Michael Miller
1d530de5b1 Add tests for fail-fast and after hooks
Inspecting issue #2
2019-04-22 19:12:45 -06:00
Michael Miller
b305c829be Allow hooks and conditions to be passed to create 2019-04-22 18:22:12 -06:00
Michael Miller
29df8716de Fixes and tweaks for Crystal 0.28
Bump version to 0.5.1
2019-04-18 19:32:24 -06:00
Michael Miller
c7ec6b0287 Note on repository mirror 2019-04-16 20:12:12 -06:00
Michael Miller
7b8ff57af9 Add description to shard.yml 2019-04-07 10:54:13 -06:00
Michael Miller
686671de51 Cache bin/ directory for ameba 2019-04-06 19:01:02 -06:00
Michael Miller
7348ae5757 Merge branch 'master' of gitlab.com:arctic-fox/spectator 2019-04-06 18:54:47 -06:00
Michael Miller
3eb6a1d676 Remove unused block arguments 2019-04-06 17:20:12 -06:00
Michael Miller
53bfcc25ef Add Ameba and address code linting issues 2019-04-06 17:19:02 -06:00
Michael Miller
99926c775e Fix symbolic not working for short-hand it syntax 2019-04-06 15:21:37 -06:00
Michael Miller
365bd1ec2f Fix failing tests 2019-04-06 12:48:41 -06:00
Michael Miller
dd943c9046 Fix botched copy-paste 2019-04-06 12:42:08 -06:00
Michael Miller
659174c66a Add placeholder negate method 2019-04-06 12:41:38 -06:00
Michael Miller
ddc55ba067 Don't inspect in AlternativeMatchDataValue to_s 2019-04-06 00:03:36 -06:00
Michael Miller
33c838a062 Fix copy/paste fail 2019-04-05 23:59:27 -06:00
Michael Miller
12c71a25cd Merge branch 'master' of gitlab.com:arctic-fox/spectator 2019-04-05 23:53:55 -06:00
Michael Miller
9650d7f9c1 Use inspect on values in to_s
The to_json method calls to_s, which results in incorrect output.
2019-04-05 23:13:23 -06:00
Michael Miller
53de72805b Add skip macro as alternative to pending 2019-04-05 20:07:04 -06:00
Michael Miller
c18d9c4ffd Allow top-level context macro 2019-04-05 18:38:57 -06:00
Michael Miller
7a0e28945a Merge branch 'master' of gitlab.com:arctic-fox/spectator 2019-04-03 18:20:24 -06:00
Michael Miller
31a2bbcebb random_sample should use Spectator's global random 2019-04-02 22:22:40 -06:00
Michael Miller
57c54d943c Add info on generated docs 2019-04-02 22:10:52 -06:00