mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use stub instead of abstract_stub by default for stub_all
RSpec doesn't appear to raise unexpected message errors for standard object methods (like to_s). There are also a lot of issues that arise when requiring a stub on common methods.
This commit is contained in:
parent
c9f91299fe
commit
0fb7be6722
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ module Spectator
|
|||
# Redefines all methods on a type to conditionally respond to messages.
|
||||
# Methods will raise `UnexpectedMessage` if they're called when they shouldn't be.
|
||||
# Otherwise, they'll return the configured response.
|
||||
private macro stub_all(type_name, *, with style = :abstract_stub)
|
||||
private macro stub_all(type_name, *, with style = :stub)
|
||||
{% type = type_name.resolve %}
|
||||
{% if type.superclass %}
|
||||
stub_all({{type.superclass}}, with: {{style}})
|
||||
|
|
Loading…
Reference in a new issue