Michael Miller
131b01d42c
Update version to 0.9.18
2020-04-26 11:47:55 -06:00
Michael Miller
d02b848ad5
Use the exact text from the describe value
...
This fixes described_class.new when using a generic type.
2020-04-26 11:13:07 -06:00
Michael Miller
3be9ffb7a0
Bump version to 0.9.17
2020-04-23 22:43:48 -06:00
Michael Miller
84476b0357
Treat to(mock) and to_eventually(mock) as the same
...
Fixes https://gitlab.com/arctic-fox/spectator/-/issues/48
2020-04-23 22:43:37 -06:00
Michael Miller
f329e2cbd5
Bump version to 0.9.16 (Crystal 0.34)
2020-04-06 18:24:28 -06:00
Michael Miller
6b0526fc45
Silence warnings from Crystal 0.34
2020-04-06 18:23:53 -06:00
Michael Miller
e891365ed7
Bump version to 0.9.15
2020-04-03 11:47:44 -06:00
Michael Miller
09e9c23115
Additional checks that the actual value satifies needed method
2020-04-03 11:47:11 -06:00
Michael Miller
7fadd92f62
Check that actual value is a collection
...
Previously, a compilation error would occur if the actual value didn't
respond to `to_a`.
A way to reproduce this is for the actual value to be nilable.
2020-04-03 11:32:37 -06:00
Michael Miller
748c25afcb
Fix issues with unordered array matcher
2020-04-03 11:01:54 -06:00
Michael Miller
7d463c6daa
Bump version to 0.9.14
2020-04-01 22:18:02 -06:00
Michael Miller
a655abb7ac
Fix issue when using nil with be
matcher
2020-04-01 22:17:19 -06:00
Mike Miller
e585c36207
Merge branch 'specs' into 'master'
...
Fix for arguments in mock stubs
Closes #44
See merge request arctic-fox/spectator!28
2020-03-28 17:44:05 +00:00
Michael Miller
4595fca17a
Bump to 0.9.13
2020-03-28 11:42:45 -06:00
Michael Miller
68bac59cab
Hacky solution for https://gitlab.com/arctic-fox/spectator/-/issues/44
...
Don't use a proc stub, which doesn't support arguments.
2020-03-28 11:41:49 -06:00
Michael Miller
5c24d606dd
Add specs of snippets from docs
2020-03-28 10:50:58 -06:00
Michael Miller
0322d5bd28
Add wiki mirror utility script
2020-03-28 10:48:09 -06:00
Michael Miller
1012a5f1b9
Update README
2020-03-28 10:06:54 -06:00
Mike Miller
7118fa7425
Merge branch 'patch-1' into 'master'
...
Make sure superclass isn't nil
See merge request arctic-fox/spectator!27
2020-03-20 19:19:37 +00:00
Chris Watson
e53b1167b3
Make sure superclass isn't nil
2020-03-20 16:34:37 +00:00
Michael Miller
ce4fefaab2
Add example usage of double
2020-03-07 17:05:52 -07:00
Michael Miller
5ad1277bdd
Add deferred expectations to the check list
2020-03-07 17:05:52 -07:00
Michael Miller
e343a97f37
Don't use a splat here
2020-03-07 17:05:52 -07:00
Michael Miller
cb9f5338fe
Bump version to 0.9.11
2020-03-04 23:16:58 -07:00
Michael Miller
e126cb744b
Ensure that a TypeNode is resolved
...
When describing a constant, the `resolve?` method can return a
non-TypeNode, which is the constant's value.
The Crystal docs seem to indicate this should only return `TypeNode` or
`NilLiteral`.
But, I can see when this would be useful to resolve a constant in a
macro.
To work around this, `described_class` and `subject` should only be
defined when it resolves to a `TypeNode`.
Fixes arctic-fox/spectator#40
Fixes arctic-fox/spectator#41
2020-03-04 23:16:29 -07:00
Michael Miller
d945a414f9
Bump version to 0.9.10
2020-03-03 16:23:53 -07:00
Michael Miller
d0f229c659
Pass example proc to around_each hook if there are no arguments
2020-03-03 15:20:25 -07:00
Michael Miller
5543c07766
Bump version to 0.9.9
2020-02-22 22:59:42 -07:00
Michael Miller
e92aa7ed57
Implicit subject should not use .new with modules
...
Fixes GitHub issue https://github.com/icy-arctic-fox/spectator/issues/6
2020-02-22 22:59:09 -07:00
Michael Miller
f5f1361477
Bump version to 0.9.8
...
Fixed GitHub Issue https://github.com/icy-arctic-fox/spectator/issues/5 - Thanks @jinn999
2020-02-21 09:57:09 -07:00
Mike Miller
2ec9ab2e09
Merge branch 'fix-macro-syntax-error-in-be-between' into 'master'
...
Fix macro syntax error in be between
See merge request arctic-fox/spectator!26
2020-02-21 16:55:18 +00:00
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