Skip to content

Commit b999859

Browse files
committed
Add View Specs section to README
1 parent 13b1deb commit b999859

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Hopefully this will be of help to those of you learning RSpec and Rails. If ther
4343
- [Feature Specs & Docs](#feature-specs--docs)
4444
- [Mailer Specs & Docs](#mailer-specs--docs)
4545
- [Controller Specs & Docs](#controller-specs--docs)
46+
- [View Specs & Docs](#view-specs--docs)
4647
- [Helper Specs & Docs](#helper-specs--docs)
4748
- [Routing Specs & Docs](#routing-specs--docs)
4849
- [Enable Spring for RSpec](#enable-spring-for-rspec)
@@ -63,11 +64,11 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
6364

6465
# Run Specs in a Random Order
6566

66-
In a dependable, repeatable automated test suite, data stores (such as database, job queues, and sent email on `ActionMailer::Base.deliveries`) should return to a consistent state between each spec, regardless of the order specs are run in.
67+
In a dependable, repeatable automated test suite, data stores (such as database, job queues, and sent email on `ActionMailer::Base.deliveries`) should return to a consistent state between each spec, regardless of the order specs are run in.
6768

6869
For a maintainable, predictable test suite, one spec should not set up data (e.g. creating users) needed by a later spec to pass. Each spec should look after its own test data and clear up after itself. (NB. If there is reference data that all tests need, such as populating a `countries` table, then this can go in `db/seeds.rb` and be run once before the entire suite).
6970

70-
The specs run in a random order each time the test suite is run. This helps prevent the introduction of run order and test data dependencies between tests, which are best avoided.
71+
The specs run in a random order each time the test suite is run. This helps prevent the introduction of run order and test data dependencies between tests, which are best avoided.
7172

7273
Random order test runs are configured using the `config.order = :random` and `Kernel.srand config.seed` options in [spec/spec_helper.rb](spec/spec_helper.rb).
7374

@@ -243,6 +244,10 @@ See [RSpec Rails](https://relishapp.com/rspec/rspec-rails/v/3-1/docs) for instal
243244
- [Controller specs API](https://relishapp.com/rspec/rspec-rails/v/3-1/docs/controller-specs)
244245
- [Controller specs cheatsheet](https://gist.github.com/eliotsykes/5b71277b0813fbc0df56)
245246

247+
## View Specs & Docs
248+
- [The Big List of View Specs](https://eliotsykes.com/view-specs)
249+
- [View specs API](https://relishapp.com/rspec/rspec-rails/v/3-3/docs/view-specs)
250+
246251
## Helper Specs & Docs
247252
- [spec/helpers/application_helper_spec.rb](spec/helpers/application_helper_spec.rb)
248253
- [Helper specs API](https://relishapp.com/rspec/rspec-rails/v/3-1/docs/helper-specs/helper-spec)
@@ -259,7 +264,7 @@ See [RSpec Rails](https://relishapp.com/rspec/rspec-rails/v/3-1/docs) for instal
259264
To take advantage of this boost when you run `bin/rspec`, the `spring-commands-rspec` gem needs to be installed and a new `rspec` binstub needs to be created:
260265

261266
```bash
262-
# 1. Add `spring-commands-rspec` to Gemfile in development and test groups and
267+
# 1. Add `spring-commands-rspec` to Gemfile in development and test groups and
263268
# install gem:
264269
bundle install
265270

@@ -278,9 +283,9 @@ https://github.com/jonleighton/spring-commands-rspec
278283

279284
# Automated Continuous Integration with Travis CI
280285

281-
Continuous Integration (CI) is the practice of integrating new code into the master branch frequently, to help detect merge conflicts, bugs, and improve the quality of the software a development team writes.
286+
Continuous Integration (CI) is the practice of integrating new code into the master branch frequently, to help detect merge conflicts, bugs, and improve the quality of the software a development team writes.
282287

283-
CI is usually accompanied by running an application's test suite against the latest code changes, and flagging any test failures that are found. Developers are expected to investigate and fix these failures to maintain a passing test suite and therefore quality.
288+
CI is usually accompanied by running an application's test suite against the latest code changes, and flagging any test failures that are found. Developers are expected to investigate and fix these failures to maintain a passing test suite and therefore quality.
284289

285290
[Travis CI](https://travis-ci.org) is a build server that helps automate the CI process. Travis CI runs an application's tests against the latest changes pushed to the application's code respository. In this project, Travis CI runs the project's tests (`rake test`) on pull requests and on changes to the master branch.
286291

@@ -299,4 +304,4 @@ Travis CI configuration how-to and example:
299304
- Andy Waite http://blog.andywaite.com/
300305
- Alex Birdsall https://github.com/ambirdsall
301306
- Lee Smith https://github.com/leesmith
302-
- Your name here, contributions are welcome and easy, just fork the GitHub repo, make your changes, then submit your pull request! Please ask if you'd like some help.
307+
- Your name here, contributions are welcome and easy, just fork the GitHub repo, make your changes, then submit your pull request! Please ask if you'd like some help.

0 commit comments

Comments
 (0)