Skip to content

Commit

Permalink
Surround inline code in back ticks.
Browse files Browse the repository at this point in the history
  • Loading branch information
cupakromer committed Apr 5, 2014
1 parent bf37a20 commit eb02899
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion features/command_line/README.md
Expand Up @@ -8,7 +8,7 @@ For a full list of options, run the `rspec` command with the `--help` flag:
### Run with `ruby`

Generally, life is simpler if you just use the `rspec` command. If you must use the `ruby`
command, however, you'll need to require `"rspec/autorun"`. You can
command, however, you'll need to `require "rspec/autorun"`. You can
either pass a `-rrspec/autorun` CLI option when invoking `ruby`, or add
a `require 'rspec/autorun'` to one or more of your spec files.

Expand Down
2 changes: 1 addition & 1 deletion features/command_line/example_name_option.feature
@@ -1,6 +1,6 @@
Feature: --example option

Use the --example (or -e) option to filter examples by name.
Use the `--example` (or `-e`) option to filter examples by name.

The argument is matched against the full description of the example,
which is the concatenation of descriptions of the group (including
Expand Down
4 changes: 2 additions & 2 deletions features/command_line/exit_status.feature
@@ -1,8 +1,8 @@
Feature: exit status

The rspec command exits with an exit status of 0 if all examples pass,
The `rspec` command exits with an exit status of 0 if all examples pass,
and 1 if any examples fail. The failure exit code can be overridden
using the --failure-exit-code option.
using the `--failure-exit-code` option.

Scenario: Exit with 0 when all examples pass
Given a file named "ok_spec.rb" with:
Expand Down
6 changes: 3 additions & 3 deletions features/command_line/format_option.feature
@@ -1,6 +1,6 @@
Feature: --format option

Use the --format option to tell RSpec how to format the output.
Use the `--format` option to tell RSpec how to format the output.

RSpec ships with several formatters built in. By default, it uses the progress
formatter, which generates output like this:
Expand All @@ -14,8 +14,8 @@ Feature: --format option

$ rspec spec --format documentation

You can also specify an output target ($stdout by default) with an --out
option immediately following the --format option:
You can also specify an output target (`$stdout` by default) with an `--out`
option immediately following the `--format` option:

$ rspec spec --format documentation --out rspec.txt

Expand Down
4 changes: 2 additions & 2 deletions features/command_line/init.feature
@@ -1,7 +1,7 @@
Feature: --init option

Use the --init option on the command line to generate conventional
files for an rspec project. It generates a `.rspec` and
Use the `--init` option on the command line to generate conventional
files for an RSpec project. It generates a `.rspec` and
`spec/spec_helper.rb` with some example settings to get you started.

These settings treat the case where you run an individual spec file
Expand Down
18 changes: 9 additions & 9 deletions features/command_line/tag.feature
@@ -1,18 +1,18 @@
Feature: --tag option

Use the --tag (or -t) option to filter the examples by tags.
Use the `--tag` (or `-t`) option to filter the examples by tags.

The tag can be a simple name or a name:value pair. In the first case,
examples with :name => true will be filtered. In the second case, examples
with :name => value will be filtered, where value is always a string. In
both cases, name is converted to a symbol.
The tag can be a simple `name` or a `name:value` pair. In the first case,
examples with `:name => true` will be filtered. In the second case, examples
with `:name => value` will be filtered, where `value` is always a string. In
both cases, `name` is converted to a symbol.

Tags can also be used to exclude examples by adding a ~ before the tag. For
example ~tag will exclude all examples marked with :tag => true and
~tag:value will exclude all examples marked with :tag => value.
Tags can also be used to exclude examples by adding a `~` before the tag. For
example `~tag` will exclude all examples marked with `:tag => true` and
`~tag:value` will exclude all examples marked with `:tag => value`.

To be compatible with the Cucumber syntax, tags can optionally start with
an @ symbol, which will be ignored.
an `@` symbol, which will be ignored.

Background:
Given a file named "tagged_spec.rb" with:
Expand Down
Expand Up @@ -11,7 +11,7 @@ Feature: Excluding lines from the backtrace
/lib\/rspec\/(core|expectations|matchers|mocks)/

This list can be modified or replaced with the `backtrace_exclusion_patterns`
option. Additionally, rspec can be run with the `--backtrace` option to skip
option. Additionally, `rspec` can be run with the `--backtrace` option to skip
backtrace cleaning entirely.

Scenario: Using default backtrace_exclusion_patterns
Expand Down
2 changes: 1 addition & 1 deletion features/configuration/enable_global_dsl.feature
Expand Up @@ -16,7 +16,7 @@ Feature: Global namespace DSL

`config.expose_dsl_globally = false`.

For backwards compatibility it defaults to true.
For backwards compatibility it defaults to `true`.

Scenario: By default RSpec allows the DSL to be used globally
Given a file named "spec/example_spec.rb" with:
Expand Down
8 changes: 4 additions & 4 deletions features/configuration/fail_fast.feature
@@ -1,6 +1,6 @@
Feature: fail fast

Use the fail_fast option to tell RSpec to abort the run on first failure:
Use the `fail_fast` option to tell RSpec to abort the run on first failure:

RSpec.configure {|c| c.fail_fast = true}

Expand All @@ -10,7 +10,7 @@ Feature: fail fast
RSpec.configure {|c| c.fail_fast = true}
"""

Scenario: Fail_fast with no failures (runs all examples)
Scenario: `fail_fast` with no failures (runs all examples)
Given a file named "spec/example_spec.rb" with:
"""ruby
RSpec.describe "something" do
Expand All @@ -24,7 +24,7 @@ Feature: fail fast
When I run `rspec spec/example_spec.rb`
Then the examples should all pass

Scenario: Fail_fast with first example failing (only runs the one example)
Scenario: `fail_fast` with first example failing (only runs the one example)
Given a file named "spec/example_spec.rb" with:
"""ruby
require "spec_helper"
Expand All @@ -40,7 +40,7 @@ Feature: fail fast
When I run `rspec spec/example_spec.rb -fd`
Then the output should contain "1 example, 1 failure"

Scenario: Fail_fast with multiple files, second example failing (only runs the first two examples)
Scenario: `fail_fast` with multiple files, second example failing (only runs the first two examples)
Given a file named "spec/example_1_spec.rb" with:
"""ruby
require "spec_helper"
Expand Down
2 changes: 1 addition & 1 deletion features/configuration/failure_exit_code.feature
@@ -1,6 +1,6 @@
Feature: failure exit code

Use the feature_exit_code option to set a custom exit code when RSpec fails.
Use the `feature_exit_code` option to set a custom exit code when RSpec fails.

RSpec.configure { |c| c.failure_exit_code = 42 }

Expand Down
2 changes: 1 addition & 1 deletion features/configuration/pattern.feature
@@ -1,6 +1,6 @@
Feature: pattern

Use the pattern option to tell RSpec to look for specs in files that match a pattern other than "**/*_spec.rb".
Use the `--pattern` option to tell RSpec to look for specs in files that match a pattern other than "**/*_spec.rb".

Background:
Given a file named "spec/example_spec.rb" with:
Expand Down
@@ -1,6 +1,6 @@
Feature: run all when everything filtered

Use the run_all_when_everything_filtered option to tell RSpec to run all the
Use the `run_all_when_everything_filtered` option to tell RSpec to run all the
specs in the case where you try to run a filtered list of specs but no specs
match that filter. This works well when paired with an inclusion filter like
`:focus => true`, as it will run all the examples when none match the
Expand Down
4 changes: 2 additions & 2 deletions features/helper_methods/modules.feature
Expand Up @@ -6,9 +6,9 @@ Feature: Define helper methods in a module
your example groups so that the methods in the module are available
in the example groups themselves (but not in the actual examples).

You can also include or extend the module onto only certain example
You can also `include` or `extend` the module onto only certain example
groups by passing a metadata hash as the last argument. Only groups
that match the given metadata will include or extend the module. You
that match the given metadata will `include` or `extend` the module. You
can also specify metadata using only symbols.

Background:
Expand Down
16 changes: 8 additions & 8 deletions features/hooks/around_hooks.feature
@@ -1,20 +1,20 @@
Feature: around hooks

Around hooks receive the example as a block argument, extended to behave like
`around` hooks receive the example as a block argument, extended to behave like
a proc. This lets you define code that should be executed before and after
the example. Of course, you can do the same thing with before and after hooks,
the example. Of course, you can do the same thing with `before` and `after` hooks,
and it's often cleaner to do so.

Where around hooks shine is when you want to run an example in a block. For
Where `around` hooks shine is when you want to run an example in a block. For
example, if your database library offers a transaction method that receives
a block, you can use an around hook as described in the first scenario:
a block, you can use an `around` hook as described in the first scenario:

WARNING: around hooks do not share state with the example the way before and
after hooks do. This means that you can not share instance variables between
around hooks and examples.
WARNING: `around` hooks do not share state with the example the way `before` and
`after` hooks do. This means that you can not share instance variables between
`around` hooks and examples.

Also, mock frameworks are set up and torn down within the context of running
the example, so you can not interact with them directly in around hooks.
the example, so you can not interact with them directly in `around` hooks.

Scenario: Use the example as a proc within the block passed to around()
Given a file named "example_spec.rb" with:
Expand Down
4 changes: 2 additions & 2 deletions features/hooks/before_and_after_hooks.feature
Expand Up @@ -9,7 +9,7 @@ Feature: before and after hooks
after(:example) # run after each example
after(:context) # run one time only, after all of the examples in a group

Before and after blocks are called in the following order:
`before` and `after` blocks are called in the following order:

before suite
before context
Expand All @@ -19,7 +19,7 @@ Feature: before and after hooks
after suite

`before` and `after` hooks can be defined directly in the example groups they
should run in, or in a global RSpec.configure block.
should run in, or in a global `RSpec.configure` block.

Setting instance variables are not supported in `before(:suite)`.

Expand Down
2 changes: 1 addition & 1 deletion features/metadata/current_example.feature
@@ -1,7 +1,7 @@
Feature: current example

You can reference the example object, and access its metadata, using
a block argument to it, before and after hooks, let, and subject.
a block argument to `it`, `before` and `after` hooks, `let`, and `subject`.

Scenario: Access the example object from within an example
Given a file named "spec/example_spec.rb" with:
Expand Down
2 changes: 1 addition & 1 deletion features/metadata/described_class.feature
@@ -1,7 +1,7 @@
Feature: described class

If the first argument to the outermost example group is a class, the class is
exposed to each example via the described_class() method.
exposed to each example via the `described_class()` method.

Scenario: Access the described class from the example
Given a file named "spec/example_spec.rb" with:
Expand Down

0 comments on commit eb02899

Please sign in to comment.