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

Function _setup_hello_world

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

Source from the content-addressed store, hash-verified

47
48
49def _setup_hello_world(tmp_path):
50 bin_dir = tmp_path.joinpath('bin')
51 bin_dir.mkdir()
52 bin_dir.joinpath('ruby_hook').write_text(
53 '#!/usr/bin/env ruby\n'
54 "puts 'Hello world from a ruby hook'\n",
55 )
56 gemspec = '''\
57Gem::Specification.new do |s|
58 s.name = 'ruby_hook'
59 s.version = '0.1.0'
60 s.authors = ['Anthony Sottile']
61 s.summary = 'A ruby hook!'
62 s.description = 'A ruby hook!'
63 s.files = ['bin/ruby_hook']
64 s.executables = ['ruby_hook']
65end
66'''
67 tmp_path.joinpath('ruby_hook.gemspec').write_text(gemspec)
68
69
70def test_ruby_hook_system(tmp_path):

Callers 3

test_ruby_hook_systemFunction · 0.85
test_ruby_hook_defaultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected