generated from just-the-docs/just-the-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bec6d2
commit 7c4597c
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<article> | ||
<h2 id="redundant-require"> | ||
<a href="#redundant-require"> | ||
Redundant require | ||
</a> | ||
</h2> | ||
|
||
<p>Avoid redundant <code>require</code> in your spec files. Use <code>.rspec</code> file instead.</p> | ||
|
||
<div class="bad"> | ||
{% highlight ruby %} | ||
# spec/models/user_spec.rb | ||
require 'rails_helper' | ||
|
||
describe User do | ||
end | ||
{% endhighlight %} | ||
</div> | ||
|
||
<div class="good"> | ||
{% highlight ruby %} | ||
# spec/models/user_spec.rb | ||
describe User do | ||
end | ||
{% endhighlight %} | ||
</div> | ||
|
||
<div class="good"> | ||
{% highlight ruby %} | ||
# .rspec | ||
--require rails_helper | ||
{% endhighlight %} | ||
</div> | ||
|
||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters