diff --git a/book/introduction/rspec.md b/book/introduction/rspec.md index 8920ec2..dace41f 100644 --- a/book/introduction/rspec.md +++ b/book/introduction/rspec.md @@ -77,7 +77,8 @@ This creates the following files: reduce some noise in test output. [uncommented them]: https://github.com/thoughtbot/testing-rails/commit/572ddcebcf86c74687ced40ddb0aad234f6e9657 -[commented out a few specific settings]: https://github.com/thoughtbot/testing-rails/commit/f5a18edd7ebecbc4c30b7a2038f1ae5c99455dc6 +[commented out a few specific settings]: https://github.com/thoughtbot/testing-rails/commit/1c5e29def9e64d4e67abb5a0867c67348468ab5b + * [`spec/rails_helper.rb`](https://github.com/thoughtbot/testing-rails/blob/b86752a0690a2800c6f57e23974bfe11c8b5fe28/example_app/spec/rails_helper.rb) diff --git a/book/types_of_tests/feature_specs.md b/book/types_of_tests/feature_specs.md index caa9d8a..22022cf 100644 --- a/book/types_of_tests/feature_specs.md +++ b/book/types_of_tests/feature_specs.md @@ -58,7 +58,7 @@ require "capybara/rails" With that installed, we're ready to write our spec. Take a look at the completed version. We'll go through it line by line: -` spec/features/user_submits_a_link_spec.rb@831e7a9e +` spec/features/user_submits_a_link_spec.rb@c20b7009 Create a new file at `spec/features/user_submits_a_link_spec.rb`. @@ -85,7 +85,7 @@ because old versions of RSpec used monkeypatching to define top level methods on `config.disable_monkey_patching!`, as this will be the default functionality in future versions of RSpec. -[commenting in]: https://github.com/thoughtbot/testing-rails/blob/6540e7d25a01e3dae6c65680d958ec627c8e702a/example_app/spec/spec_helper.rb#L53 +[commenting in]: https://github.com/thoughtbot/testing-rails/blob/e03ef3ca8150d8d28c4cdf760f53d11070447b67/example_app/spec/spec_helper.rb#L53 `.feature` takes a string, which you use to describe your feature. We'll usually name this the same thing as we named our file and create a new file for every @@ -321,12 +321,10 @@ NameError: ``` It looks like `root_path` is undefined. This helper method comes from Rails when -you [define the route] in `config/routes.rb`. We want our homepage to show all -of the links that have been submitted, so it will point to the `index` action of +you define the route in `config/routes.rb`. We want our homepage to show all of +the links that have been submitted, so it will point to the `index` action of our `LinksController`: -[define the route]: https://github.com/thoughtbot/testing-rails/commit/831e7a9e620c4d5d35f4f9f062def7b437126843#diff-b3ca36993330dbdade67e1564f10c872R4 - ```ruby root to: "links#index" ``` @@ -460,4 +458,4 @@ see, you should run the tests. I'll leave the implementation of the rest of this feature as an exercise for the reader. Take a peak at [my commit] if you get stuck. -[my commit]: https://github.com/thoughtbot/testing-rails/commit/831e7a9e620c4d5d35f4f9f062def7b437126843 +[my commit]: https://github.com/thoughtbot/testing-rails/commit/c20b7009e46454070e87156a9947be39f08040f9