-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attr_readonly to list of Symbols #332
Add attr_readonly to list of Symbols #332
Conversation
I have signed the CLA! |
test "correctly handles attr_readonly" do | ||
response = generate_document_symbols_for_source(<<~RUBY) | ||
class FooModel < ApplicationRecord | ||
attr_readonly :foo | ||
end | ||
RUBY | ||
|
||
assert_equal(1, response.size) | ||
assert_equal("FooModel", response[0].name) | ||
assert_equal(1, response[0].children.size) | ||
assert_equal("attr_readonly :foo", response[0].children[0].name) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if you wanted this test. I see that has_one, has_many, has_and_belongs_to_many are all untested and just fall under the belongs_to
test basically. So maybe this test isn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's not essential, but I'm ok with keeping it for now.
Fixes #312