Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/rails/on_boarding/02_rspec/chapter_II.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,10 @@ end

Add a validation to the method `publish_if_live` in the Book model which ensures that no publications can be made during the weekends.

Create the necessary specs you seem fit to test this functionality.
Create the necessary specs you seem fit to test this functionality.

## Shoulda Matchers

[Shoulda Matchers](https://github.com/thoughtbot/shoulda-matchers) provides RSpec- one-liners to test common Rails functionality. It helps to eliminate long line of code to make it more straight forward and readable.

With this in mind use shoulda matchers for any specs you seem fit.
10 changes: 10 additions & 0 deletions docs/rails/on_boarding/02_rspec/chapter_IV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Chapter IV
`(avr. time for this chapter: TBD)`

While unit tests verify the correctness of individual units of code in isolation, integration tests ensure that these units work correctly when combined.

## Capybara

In the context of RSpec, integration tests are facilitated through tools like [Capybara](https://github.com/teamcapybara/capybara), which allows for simulating user interactions with the application's web interface.

Create any tests that make sense to test the possible flows.