MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_ruby_hook_language_version

Function test_ruby_hook_language_version

tests/languages/ruby_test.py:110–119  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

108
109@xfailif_windows # pragma: win32 no cover
110def test_ruby_hook_language_version(tmp_path):
111 _setup_hello_world(tmp_path)
112 tmp_path.joinpath('bin', 'ruby_hook').write_text(
113 '#!/usr/bin/env ruby\n'
114 'puts RUBY_VERSION\n'
115 "puts 'Hello world from a ruby hook'\n",
116 )
117
118 ret = run_language(tmp_path, ruby, 'ruby_hook', version='3.2.0')
119 assert ret == (0, b'3.2.0\nHello world from a ruby hook\n')
120
121
122@xfailif_windows # pragma: win32 no cover

Calls 2

run_languageFunction · 0.90
_setup_hello_worldFunction · 0.85

Tested by

no test coverage detected