Sha256: 5e78a2034c6bf485942ea242a7a6e3ef50d6f8bb11f7ec908e37c79525e6f4e8

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

[<< back](README.md)

1. [Definition section](#definition-section)
2. [Execute command](#execute-command)
3. [Result](#result)

# Example: learn-07-readme

Create README files (with test instructions) from our test definition.

> This example is on GitHub repository at `examples/learn-07-readme/`.

## Definition section

Take a look at our test definition section (Group):
```ruby
group "Customize readme output" do
  readme "This is our example 07."
  readme "And here we'll see how to use readme keyword"

  target "Create user david."
  readme "Help: you can use 'useradd' command to create users."
  readme "Remember: Only root is permitted to create new users."

  run "id david"
  expect "david"

end
```

> In this example, localhost's OS must be GNU/Linux (any other compatible OS) because the command used is `id david`.

There exists some `readme` instructions after `group` and `target` lines.

## Execute command

To generate automatically a README file from previous test, execute this:

```
teuton readme example/learn-07-readme > example/learn-07-readme/README.md
```

## Result

**Let's see the output**: Content of `example/learn-07-readme/README.md` file.

---
# learn-07-readme

## Customize readme output

This is our example 07.
And here we'll see how to use readme keyword

Go to [LOCALHOST](#required-hosts) host, and do next:
* Create user david.
    * Help: you can use 'useradd' command to create users.
    * Remember: Only root is permitted to create new users.
---

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
teuton-2.1.11 docs/learn/example-07-readme.md