Address Ameba issues

This commit is contained in:
Michael Miller 2022-03-19 17:22:13 -06:00
parent b83c6b7b1e
commit b3fa2e3bfe
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF
2 changed files with 1 additions and 3 deletions

View file

@ -161,8 +161,6 @@ Spectator.describe Spectator::NullDouble do
subject(dbl) { EmptyDouble.new }
it "returns self with undefined messages" do
io = IO::Memory.new
pp = PrettyPrint.new(io)
aggregate_failures do
# Methods that would cause type cast errors are omitted from this list.
expect_null_double(dbl, dbl.!=(42))

View file

@ -94,7 +94,7 @@ module Spectator
# Additionally, the block usage is forwarded for methods that accept it.
# Even though `super` and `previous_def` without parameters forward the arguments, they don't forward a block.
%}
{% original = ((@type.methods.includes?(method) || !@type.ancestors.any? { |a| a.methods.includes?(method) }) ? :previous_def : :super).id %}
{% original = ((@type.methods.includes?(method) || !@type.ancestors.any? &.methods.includes?(method)) ? :previous_def : :super).id %}
{% if method.accepts_block?
original = "#{original} { |*_spectator_yargs| yield *_spectator_yargs }".id
end %}