@@ -4,7 +4,7 @@ rspec-core provides the structure for writing executable examples of how your
4
4
code should behave, and an ` rspec ` command with tools to constrain which
5
5
examples get run and tailor the output.
6
6
7
- ## install
7
+ ## Install
8
8
9
9
gem install rspec # for rspec-core, rspec-expectations, rspec-mocks
10
10
gem install rspec-core # for rspec-core only
@@ -19,7 +19,7 @@ RSpec repos as well. Add the following to your `Gemfile`:
19
19
end
20
20
```
21
21
22
- ## basic structure
22
+ ## Basic Structure
23
23
24
24
RSpec uses the words "describe" and "it" so we can express concepts like a conversation:
25
25
@@ -49,7 +49,7 @@ Under the hood, an example group is a class in which the block passed to
49
49
` describe ` is evaluated. The blocks passed to ` it ` are evaluated in the
50
50
context of an _ instance_ of that class.
51
51
52
- ## nested groups
52
+ ## Nested Groups
53
53
54
54
You can also declare nested nested groups using the ` describe ` or ` context `
55
55
methods:
@@ -70,7 +70,7 @@ RSpec.describe Order do
70
70
end
71
71
```
72
72
73
- ## aliases
73
+ ## Aliases
74
74
75
75
You can declare example groups using either ` describe ` or ` context ` .
76
76
For a top level example group, ` describe ` and ` context ` are available
@@ -81,7 +81,7 @@ patching.
81
81
You can declare examples within a group using any of ` it ` , ` specify ` , or
82
82
` example ` .
83
83
84
- ## shared examples and contexts
84
+ ## Shared Examples and Contexts
85
85
86
86
Declare a shared example group using ` shared_examples ` , and then include it
87
87
in any group using ` include_examples ` .
@@ -111,7 +111,7 @@ pretty much the same as `shared_examples` and `include_examples`, providing
111
111
more accurate naming when you share hooks, ` let ` declarations, helper methods,
112
112
etc, but no examples.
113
113
114
- ## metadata
114
+ ## Metadata
115
115
116
116
rspec-core stores a metadata hash with every example and group, which
117
117
contains their descriptions, the locations at which they were
@@ -162,26 +162,26 @@ RSpec.describe Hash do
162
162
end
163
163
```
164
164
165
- ## the ` rspec ` command
165
+ ## The ` rspec ` Command
166
166
167
167
When you install the rspec-core gem, it installs the ` rspec ` executable,
168
168
which you'll use to run rspec. The ` rspec ` command comes with many useful
169
169
options.
170
170
Run ` rspec --help ` to see the complete list.
171
171
172
- ## store command line options ` .rspec `
172
+ ## Store Command Line Options ` .rspec `
173
173
174
174
You can store command line options in a ` .rspec ` file in the project's root
175
175
directory, and the ` rspec ` command will read them as though you typed them on
176
176
the command line.
177
177
178
- ## autotest integration
178
+ ## Autotest Integration
179
179
180
180
rspec-core no longer ships with an Autotest extension, if you require Autotest
181
181
integration, please use the ` rspec-autotest ` gem and see [ rspec/rspec-autotest] ( https://github.com/rspec/rspec-autotest )
182
182
for details
183
183
184
- ## get started
184
+ ## Get Started
185
185
186
186
Start with a simple example of behavior you expect from your system. Do
187
187
this before you write any implementation code:
0 commit comments