diff --git a/.codespellignore b/.codespellignore index 8f32e6a0116..f783dcd63d0 100644 --- a/.codespellignore +++ b/.codespellignore @@ -6,3 +6,5 @@ leapyears leapYears falsy warmup +procs +enumerables diff --git a/ruby/automated_testing/rspec_part_two_code_sharing.md b/ruby/automated_testing/rspec_part_two_code_sharing.md index 8a911829cab..06b3037ee61 100644 --- a/ruby/automated_testing/rspec_part_two_code_sharing.md +++ b/ruby/automated_testing/rspec_part_two_code_sharing.md @@ -41,7 +41,7 @@ end Next, create a test file for the user class in the spec directory named `user_spec.rb` and write the following tests for the `User` class to exercise the name, email and age attributes: -~~~ruby +~~~~ruby # spec/user_spec.rb require "spec_helper" diff --git a/ruby/automated_testing/test_driven_development.md b/ruby/automated_testing/test_driven_development.md index 0d28154499c..6cdd8a289c8 100644 --- a/ruby/automated_testing/test_driven_development.md +++ b/ruby/automated_testing/test_driven_development.md @@ -3,6 +3,7 @@ So far you’ve been learning how to test code that you’ve written, but there’s a popular development process that flips that concept on its head. Rather than writing code, manually testing it until you get it working, then writing a test to make sure it stays working; you can write the test **before** the code, so that you don’t have to waste *any* time manually testing. Test Driven Development is the name of this inverted development process. ### Learning Outcomes + Look through these now and use them to guide your learning. By the end of this lesson, expect to: - Learn what Test Driven Development is @@ -30,6 +31,7 @@ This development cycle is known as red-green-refactor, and it’s at the heart o One key aspect of the red-green-refactor cycle that *isn’t* in the name, is that the code you write to go from `red` to `green` should be the **minimum** amount required to pass the test. If you find that the functionality you’re adding actually does *more* than is being tested, that is a sign that your method is likely doing too much, or possibly that your tests aren’t testing all of the right functionality. #### TDD Examples + Let’s walk through a TDD approach to a basic class. Given the general problem: @@ -210,6 +212,7 @@ TODO: Exercise: TDD a value object TODO: Exercise: TDD a class that has a collaborator which doesn't exist yet using mocks ### Additional Resources + This section contains helpful links to other content. It isn't required, so consider it supplemental. Read ["TDD is Dead. Long Live Testing"](http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html) by DHH for an anti-TDD viewpoint @@ -218,7 +221,7 @@ Read ["TDD is Dead. Long Live Testing"](http://david.heinemeierhansson.com/2014/ This section contains questions for you to check your understanding of this lesson. If you’re having trouble answering the questions below on your own, review the material above to find the answer. -- What does it mean for code to be test **driven**? -- List four different advantages of TDD. -- What is the 3 part development cycle used for TDD? -- How much code should be written when going from the `red` state to the `green` state of the red-green-refactor cycle? +- [What does it mean for code to be test **driven**?](#what-is-tdd-and-why-do-it) +- [List four different advantages of TDD](#what-is-tdd-and-why-do-it) +- [What is the 3 part development cycle used for TDD?](#what-is-tdd-and-why-do-it) +- [How much code should be written when going from the `red` state to the `green` state of the red-green-refactor cycle?](#what-is-tdd-and-why-do-it)