(tmp_path)
| 47 | |
| 48 | |
| 49 | def _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 = '''\ |
| 57 | Gem::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'] |
| 65 | end |
| 66 | ''' |
| 67 | tmp_path.joinpath('ruby_hook.gemspec').write_text(gemspec) |
| 68 | |
| 69 | |
| 70 | def test_ruby_hook_system(tmp_path): |
no outgoing calls
no test coverage detected