Skip to content

Commit

Permalink
Update expected test output for parsing failures
Browse files Browse the repository at this point in the history
  • Loading branch information
KaanOzkan committed Sep 11, 2023
1 parent 89fbbe6 commit 0e35b67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/tapioca/cli/annotations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class AnnotationForSpoom

assert_stderr_includes(result, <<~ERR)
Can't import RBI file for `spoom` as it contains errors:
Error: Expected to be able to parse an expression. Expected `end` to close `class` statement. (-:4:0-3:25)
Error: Cannot parse the expression. Expected an `end` to close the `class` statement. (-:4:0)
ERR

refute_includes(result.out, "create sorbet/rbi/annotations/spoom.rbi")
Expand Down
2 changes: 1 addition & 1 deletion spec/tapioca/cli/check_shims_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def foo; end

assert_equal(<<~ERR, result.err)
Warning: Expected to be able to parse an expression. Expected `end` to close `class` statement. (sorbet/rbi/shims/foo.rbi:2:0-1:10)
Warning: Cannot parse the expression. Expected an `end` to close the `class` statement. (sorbet/rbi/shims/foo.rbi:2:0)
Duplicated RBI for ::Foo#foo:
* sorbet/rbi/shims/bar.rbi:2:2-2:14
Expand Down
4 changes: 2 additions & 2 deletions spec/tapioca/cli/gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ module Foo # Syntax error
assert_stderr_includes(result, "RBIs exported by `foo` contain errors and can't be used:")
assert_stderr_includes(
result,
"Cause: Expected to be able to parse an expression. Expected `end` to close `module` statement. ",
"Cause: Cannot parse the expression. Expected an `end` to close the `module` statement. ",
)
assert_stderr_includes(result, "foo/rbi/foo.rbi:2:0-1:26")
assert_stderr_includes(result, "foo/rbi/foo.rbi:2:0")

assert_project_file_equal("sorbet/rbi/gems/[email protected]", FOO_RBI)

Expand Down

0 comments on commit 0e35b67

Please sign in to comment.