sorbet Questions
2
I'm trying out Sorbet in an experimental open-source project (ruby_crystal_codemod). I can't figure out how to get the type-checking to work with some RSpec tests in a nested test project. When I r...
Fastigiate asked 8/12, 2019 at 10:13
1
I have a simple test but the describe keyword is not working in Sorbet tests.
The error I'm receiving on these methods:
Method `describe` does not exist on `T.class_of(<root>)`7003
RSpec.des...
Tribade asked 18/12, 2022 at 16:17
3
Sorbet is showing an error for the attr_reader, but correct me if I am wrong, sigs are required when the function is declared, not called, right?
I have tried going through the documentation but a...
2
Solved
I have a method that that has a sorbet type signature definition.
While trying to mock this method in tests using RSpec I get a type mismatch error.
I'm trying to understand how I can resolve this...
Basia asked 24/6, 2019 at 19:9
1
Solved
(Note that this isn't reproducible on sorbet.run, it's only reproducible with a local copy of Sorbet as far as I can tell)
I was hoping I could use the Typed Structs feature to create a method sig...
1
Solved
Here's example code:
# typed: true
class KeyGetter
sig {params(env_var_name: String).returns(KeyGetter)}
def self.from_env_var(env_var_name)
return Null.new if env_var_name.nil?
return new(...
1
I am trying to test Sorbet on a Rails project.
followed the adoptions guidelines
installed and run the gem sorbet-rails
changed to # typed: true
restarted vscode
but nothing is really happening...
Tubulate asked 21/6, 2019 at 11:19
1
Solved
Trying to annotate this code, the rose memoization (@||=) gives me an error Use of undeclared variable @git_sha.
# typed: strict
# frozen_string_literal: true
module Util
extend T::Sig
sig { r...
1
© 2022 - 2024 — McMap. All rights reserved.