Skip to content

Commit 3d25e16

Browse files
committed
Exercise edge case
1 parent e88dd21 commit 3d25e16

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

spec/integration/syntax_suggest_spec.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,30 @@ def bark
203203
EOM
204204
end
205205

206+
it "multi-line chain with missing paren" do
207+
source = <<~EOM
208+
class Dog
209+
def bark
210+
User
211+
.where(name: "schneems"
212+
.first
213+
end
214+
end
215+
EOM
216+
217+
io = StringIO.new
218+
SyntaxSuggest.call(
219+
io: io,
220+
source: source
221+
)
222+
out = io.string
223+
expect(out).to include(<<~EOM)
224+
> 3 User
225+
> 4 .where(name: "schneems"
226+
> 5 .first
227+
EOM
228+
end
229+
206230
it "empty else" do
207231
source = <<~EOM
208232
class Foo

0 commit comments

Comments
 (0)