mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Ignores PredicateName if alternative isn't valid (e.g. is_404?)
This commit is contained in:
parent
9e2ab9c002
commit
d6c6af883d
2 changed files with 16 additions and 2 deletions
|
@ -44,5 +44,16 @@ module Ameba::Rule
|
|||
error.message.should eq(
|
||||
"Favour method name 'picture?' over 'has_picture?'")
|
||||
end
|
||||
|
||||
it "ignores if alternative name isn't valid syntax" do
|
||||
s = Source.new %q(
|
||||
class Image
|
||||
def is_404?(x)
|
||||
true
|
||||
end
|
||||
end
|
||||
)
|
||||
subject.catch(s).should be_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue