Understanding RSpec Basics Part 1️⃣

What is RSpec?

RSpec is a popular BDD testing library for Ruby. Tests written using RSpec describes what the software does and how the interface should behave. For this reason, we refer to RSpec tests as specs

What is BDD?

BDD is an approach to software development that combines Test-Driven Development, Domain-Driven Design, and Acceptance Test-Driven Planning. RSpec helps with the TDD part of that equation, focusing on the documentation and design aspects of TDD.

Why should we write tests?

  • It builds a safety net thereby increases confidence
  • The tests describe application behavior thereby helps to document the code
  • It gives a faster feedback loop
  • Helps to make sure the code is producing the results as expected

Note: This content is a condensed form of resources from various sources, created based on what I learned and understand. And, It’s part of our new series called “Learning Capsules” which will be shared on weekly basis in similar format.

Processing…
Success! You’re on the list.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: