Skip to content
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

RSpec's plans for sorbet #67

Open
leifg opened this issue Oct 21, 2021 · 3 comments
Open

RSpec's plans for sorbet #67

leifg opened this issue Oct 21, 2021 · 3 comments

Comments

@leifg
Copy link

leifg commented Oct 21, 2021

I have been recently adopting sorbet into my projects and it greatly helped me with refactoring.

Unfortunately the typechecking errors are not extending to specs due to the DSL nature of RSpec (in general all _spec.rb files have to be typed: false).

I know that there is a project to address some of the runtime issues resulting from using rspec-mocks but I am more talking about the static checking before running the tests. It would achieve a lot of development speed when I could see which problems I need to fix in my spec without running them.

So I am wondering what the general opinion of the RSpec team is. Do you see sorbet features slowly being integrated into the framework or do you know of any third party projects that combine the strict typechecks with the dynamic nature of RSpec.

@JonRowe
Copy link
Member

JonRowe commented Oct 22, 2021

👋 I personally like the idea of Sorbet, and would have no objections to making roads towards supporting it more amongst the core libraries, but its not something thats currently planned on my end simply as I have no time to work on it. We'd probably also need to add a sorbet build to our CI, which will likely be a huge timesink.

@pirj
Copy link
Member

pirj commented Oct 22, 2021

It is getting more complicated as there is also RBS.
Can't speak for other core team members, but I personally haven't had a chance to practically apply Sorbet or RBS.
I like the idea of rspec-sorbet. Should those who are interested in using Sorbet with RSpec apply their effort there?

@Nitrodist
Copy link

Nitrodist commented Jun 1, 2022

https://stackoverflow.com/questions/72100964/sorbet-lsp-sublime-text-read-typed-false 🤔

This also affects me - wish these errors for 'describe', expect, 'let' and 'it' wouldn't pop-up:
Screenshot 2022-06-01 at 2 40 22 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants