File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -66,30 +66,30 @@ guidelines:
6666
67671 . Be sure to clean up any data in an ` after(:context) ` hook:
6868
69- ``` ruby
70- before(:context ) do
71- @widget = Widget .create!
72- end
69+ ``` ruby
70+ before(:context ) do
71+ @widget = Widget .create!
72+ end
7373
74- after(:context ) do
75- @widget .destroy
76- end
77- ```
74+ after(:context ) do
75+ @widget .destroy
76+ end
77+ ```
7878
79- If you don't do that, you'll leave data lying around that will eventually
79+ If you don' t do that, you' ll leave data lying around that will eventually
8080interfere with other examples.
8181
82822 . Reload the object in a ` before(:example)` hook.
8383
84- ``` ruby
85- before(:context ) do
86- @widget = Widget .create!
87- end
84+ ` ` ` ruby
85+ before(:context) do
86+ @widget = Widget.create!
87+ end
8888
89- before(:example ) do
90- @widget .reload
91- end
92- ```
89+ before(:example) do
90+ @widget.reload
91+ end
92+ ` ` `
9393
9494Even though database updates in each example will be rolled back, the
9595object won' t _know_ about those rollbacks so the object and its backing
You can’t perform that action at this time.
0 commit comments