Don't stub primitive methods

This commit is contained in:
Michael Miller 2022-03-12 23:02:55 -07:00
parent 291b4c75a8
commit 03aa282512
No known key found for this signature in database
GPG key ID: AC78B32D30CE34A2

View file

@ -156,7 +156,11 @@ module Spectator
stub_all({{type.superclass}}, with: {{style}})
{% end %}
{% for method in type.methods.reject { |meth| meth.name.starts_with?("_spectator") || DSL::RESERVED_KEYWORDS.includes?(meth.name.symbolize) } %}
{% for method in type.methods.reject do |meth|
meth.annotation(Primitive) ||
meth.name.starts_with?("_spectator") ||
DSL::RESERVED_KEYWORDS.includes?(meth.name.symbolize)
end %}
{{style.id}} {{method}}
{% end %}
end