Commit graph

1355 commits

Author SHA1 Message Date
Davide Paolo Tua
2bf6682816 Fix accidental deletion 2020-02-21 13:23:33 +01:00
Davide Paolo Tua
83ac420273 Add test for fix, fix test for range_matcher 2020-02-21 13:19:27 +01:00
Davide Paolo Tua
ce9bf918c1 Fix syntax errors in be_between matcher 2020-02-21 12:48:22 +01:00
Michael Miller
3aaab0e74f Fix memoized subject from context description another way
The other method gave a strange compiler error when running specs.
Something to do with "K" not having an inspect method.

In /usr/share/crystal/src/hash.cr:1826:13

 1826 | key.inspect(io)
            ^------
Error: undefined method 'inspect' for K
2020-02-16 19:50:20 -07:00
Michael Miller
86c8d6549a Update shard versions 2020-02-16 19:36:18 -07:00
Michael Miller
5cb74ebe95 Bump version to 0.9.7 2020-02-16 19:36:09 -07:00
Michael Miller
dd48bf6f25 Fix subject not being memoized when using described_class 2020-02-16 19:34:48 -07:00
Michael Miller
2aba67edae Fix idiosyncrasies around class method stubs
The new method misbehaves here.
It always appeared as defined, even though it isn't explicitly defined 
in the class.
2020-02-14 18:14:32 -07:00
Michael Miller
7a8e570bea Fix typo with should_eventually 2020-02-10 17:50:35 -07:00
Michael Miller
63ff59688b Bump version to 0.9.6 2020-02-10 17:47:02 -07:00
Michael Miller
a7db9ff0bb Don't force previous_def on class methods 2020-02-10 17:46:36 -07:00
Michael Miller
d30e65ee2d Missing ? on method name check 2020-01-20 20:42:16 -07:00
Michael Miller
cacca99c0b Formatting 2020-01-20 20:32:14 -07:00
Michael Miller
e3ad92f785 Move style checks to their own job 2020-01-20 20:31:47 -07:00
Michael Miller
721425c3c8 Run deferred expectations after all hooks 2020-01-20 20:15:49 -07:00
Michael Miller
1e3d89884b Add some RSpec docs tests for hooks 2020-01-20 20:11:19 -07:00
Michael Miller
60f1c3091b Allow be matcher to be used on structs 2020-01-19 22:39:21 -07:00
Michael Miller
3d08949c94 Add helper method specs from RSpec docs 2020-01-19 22:24:28 -07:00
Michael Miller
b1984b343a Add should keywords to examples
Allows short-hand like:
it { should be_empty }
2020-01-19 22:12:06 -07:00
Michael Miller
8381c08b05 Add subject specs 2020-01-19 22:05:38 -07:00
Michael Miller
e60c287216 Fix a dumb with merge 2020-01-19 10:05:21 -07:00
Michael Miller
1825026af7 Bump version to 0.9.4 2020-01-19 09:53:20 -07:00
Michael Miller
64f6456935 Merge branch 'specs' 2020-01-19 09:52:41 -07:00
Michael Miller
272ebcd693 Fix subject with group describing a type
An explicit subject should be used when describing a type. This mimics 
RSpec.
2020-01-19 09:52:12 -07:00
Michael Miller
15f211c4b6 Add it_fails to handle expected failures 2020-01-17 22:41:38 -07:00
Michael Miller
e3a4dedfc6 Add RSpec respond_to matcher spec 2020-01-17 22:14:25 -07:00
Michael Miller
a2508d5f6b Fix negation case for respond_to matcher 2020-01-17 22:08:52 -07:00
Michael Miller
ed48b80d58 Add RSpec raise_error matcher spec 2020-01-17 21:58:29 -07:00
Michael Miller
596f7e87c8 Formatting 2020-01-17 09:27:48 -07:00
Michael Miller
e8a437dc0a Bump version to 0.9.3 2020-01-17 14:53:04 +03:00
Michael Miller
f825a34771 Fix issue with implicit vs. explicit subject
Addresses the issue pointed out in !25

There was a recent change that set a subject to the first argument of 
`describe` and `context`. This prevented an explicitly defined subject 
from being accessible in nested groups.
2020-01-17 14:53:03 +03:00
Michael Miller
2b2fb5af3a Bump version to 0.9.3 2020-01-16 18:37:04 -07:00
Michael Miller
13a0b9e2d3 Fix issue with implicit vs. explicit subject
Addresses the issue pointed out in !25

There was a recent change that set a subject to the first argument of 
`describe` and `context`. This prevented an explicitly defined subject 
from being accessible in nested groups.
2020-01-16 18:36:40 -07:00
Arina Shmeleva
cf448576e2 Add test for subject 2020-01-17 00:49:59 +03:00
Mike Miller
d2f0f52729 Merge branch 'specs' into 'master'
Initial RSpec specs and various fixes

See merge request arctic-fox/spectator!24
2020-01-15 03:14:50 +00:00
Michael Miller
b25388a165 Merge branch 'specs' of gitlab.com:arctic-fox/spectator into specs 2020-01-14 20:10:53 -07:00
Michael Miller
d807f9866a Bump version to 0.9.2 2020-01-14 20:09:15 -07:00
Michael Miller
c48b9ed9e1 Resolve let! not working on uninferable types
Resolves https://github.com/icy-arctic-fox/spectator/issues/4
Use ValueWrapper trick again and initialize immediately with before_each 
hook.
2020-01-14 20:07:56 -07:00
Michael Miller
d5c5a82395 Add with_message modifier to raise_error matcher 2020-01-06 23:46:38 -07:00
Michael Miller
6a0a73ca76 Add RSpec match matcher spec 2020-01-06 23:05:31 -07:00
Michael Miller
f11b548f4e Mimic RSpec behavior of match matcher
The code:
expect(/foo/).to match("food")
would normally evaluate:
"food" === /foo/
which is false.
However, in RSpec, this expectation is true.
2020-01-06 23:01:45 -07:00
Michael Miller
b433511201 Add RSpec include/contain matcher spec 2020-01-06 22:51:47 -07:00
Michael Miller
6ad861365c Add RSpec have_attributes matcher spec 2020-01-06 22:33:52 -07:00
Michael Miller
f23141b3e1 Add RSpec start_with and end_with matchers specs 2020-01-06 22:19:09 -07:00
Michael Miller
5fa6b5d549 Fix negation expectation text 2020-01-06 22:11:36 -07:00
Michael Miller
590d81979e Workaround typing issues 2020-01-06 22:04:05 -07:00
Michael Miller
7868755eee Add RSpec cover matcher spec 2020-01-05 23:02:09 -07:00
Michael Miller
5673144527 Fix negative match case for contain/cover matcher 2020-01-05 23:01:25 -07:00
Michael Miller
b7c686e836 Add cover matcher
Works the same as `contain` but is for ranges.
2020-01-05 22:49:27 -07:00
Michael Miller
8143229fdb Fix failure message 2020-01-05 22:47:57 -07:00