Skip to content

Commit

Permalink
Check REGENERATE_TYPED_TESTS environment variable to make working wit…
Browse files Browse the repository at this point in the history
…h this particular test easier
  • Loading branch information
davebenvenuti committed Jan 8, 2025
1 parent f537118 commit 821692e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/codegen_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ def test_generate_types
# While this is not great, writing tests that ensure that signatures are generated
# correctly without pulling in all of sorbet is at the very least incredibly complex.
# So this is the solution for now.
File.write("test/fixtures/typed_test.correct.rb", gen.to_ruby) if ENV["REGENERATE_TYPED_TESTS"] == "true"

assert_equal(File.read("test/fixtures/typed_test.correct.rb"), gen.to_ruby)
end

Expand Down

0 comments on commit 821692e

Please sign in to comment.