Skip to content

Commit

Permalink
add spec
Browse files Browse the repository at this point in the history
ref: #331
  • Loading branch information
kzkn committed Dec 9, 2024
1 parent 15fc93e commit bfb79f1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/lib/rufo/formatter_source_specs/method_definition.rb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,13 @@ end
def foo(a, ...)
p(...)
end

#~# ORIGINAL issue_331
def foo a:
a
end

#~# EXPECTED
def foo(a:)
a
end
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,18 @@ def a x;x end;def b y;y end;def c z;z end # comment
def a(x); x end
def b(y); y end
def c(z); z end # comment

#~# ORIGINAL issue_331
#~# parens_in_def: :dynamic
class User
def self.by_uid uid:
joins(:authentications).where(authentications: { uid: }).first
end
end

#~# EXPECTED
class User
def self.by_uid uid:
joins(:authentications).where(authentications: { uid: }).first
end
end

0 comments on commit bfb79f1

Please sign in to comment.