Skip to content

Commit 8158b45

Browse files
小野 直人ko1
authored andcommitted
Add new lines
1 parent e693dc8 commit 8158b45

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ $ ruby test/debug/bp_test.rb -h # to see all the test options
2626
```
2727

2828
## Generate Tests
29+
2930
There is a test generator in `debug.rb` project to make it easier to write tests.
31+
3032
### Quickstart
33+
3134
This section shows you how to create test file by test generator. For more advanced informations on creating tests, please take a look at [gentest options](#gentest-options). (You can also check by `$bin/gentest -h`)
35+
3236
#### 1. Create a target file for debuggee.
37+
3338
Let's say, we created `target.rb` which is located in top level directory of debugger.
39+
3440
```ruby
3541
module Foo
3642
class Bar
@@ -42,11 +48,15 @@ module Foo
4248
bar = Bar.new
4349
end
4450
```
51+
4552
#### 2. Run `gentest` as shown in the example below.
53+
4654
```shell
4755
$ bin/gentest target.rb
4856
```
57+
4958
#### 3. Debugger will be executed. You can type any debug commands.
59+
5060
```shell
5161
$ bin/gentest target.rb
5262
DEBUGGER: Session start (pid: 11139)
@@ -119,8 +129,11 @@ created: /Users/naotto/workspace/debug/test/tool/../debug/foo_test.rb
119129
class: FooTest
120130
method: test_1629720194
121131
```
132+
122133
#### 4. The test file will be created as `test/debug/foo_test.rb`.
134+
123135
If the file already exists, **only method** will be added to it.
136+
124137
```ruby
125138
# frozen_string_literal: true
126139

@@ -204,6 +217,7 @@ end
204217
```
205218

206219
#### gentest options
220+
207221
You can get more information about `gentest` here.
208222

209223
The default method name is `test_#{some integer numbers}`, the class name is `FooTest`, and the file name will be `foo_test.rb`.

0 commit comments

Comments
 (0)