Logo: Relish

  1. Sign in

Project: Code-test

Testing Code Blocks

In the feature description.

Only indent to specify code block:

No indent:

/a regex/
a_string = "foo"
a_string.to_sym

2 space indent:

/a regex/
a_string = "foo"
a_string.to_sym

4 space indent:

/a regex/
a_string = "foo"
a_string.to_sym

Triple backticks

No indent:

/a regex/
a_string = "foo"
a_string.to_sym

2 space indent:

  /a regex/
  a_string = "foo"
  a_string.to_sym

4 space indent:

```
/a regex/
a_string = "foo"
a_string.to_sym
```

Triple backticks (with syntax)

No indent:

/a regex/
a_string = "foo"
a_string.to_sym

2 space indent:

  /a regex/
  a_string = "foo"
  a_string.to_sym

4 space indent:

```ruby
/a regex/
a_string = "foo"
a_string.to_sym
```

Tripe quotes (with syntax):

No indent:

"""ruby
/a regex/
a_string = "foo"
a_string.to_sym
"""

2 space indent:

"""ruby
/a regex/
a_string = "foo"
a_string.to_sym
"""

4 space indent:

"""ruby
/a regex/
a_string = "foo"
a_string.to_sym
"""
Scenarios
Code block in scenario
Given
some ruby code:
/a regex/
a_string = "foo"
a_string.to_sym

Last published over 4 years ago by cupakromer.