Rails Testing Handbook: A Free Ebook to Help You Build Better Apps
Bugs and messy code slow down development, and can make complex projects fail. We write code with good intentions, but in practice as complexity increases we need a system to help us avoid problems.
This is where BDD (Behavior-driven Development) can make a huge difference: it provides us with a sustainable process for continuously producing high-quality software, with clean code and automated tests as a side effect.
At Semaphore, we're passionate about writing well-designed code. Not that we care so much about having a glorious design to admire. We just don’t like things that slow down product development. We’ve been practicing BDD from the first lines of code that eventually became Semaphore. Experience has taught us that it’s simply a good way to write code that doesn’t rot.
We also like to share what works. That's why we published many Ruby tutorials focused on TDD/BDD, as well as tutorials for many other languages. As a next step, we’ve decided to write a handbook encompassing everything a developer needs to build sustainable Rails apps.
In Rails Testing Handbook, you’ll learn about:
- How to get in the BDD mindset and apply it in practice;
- Setting up RSpec, Cucumber, database cleaner and others;
- Developing features from scratch in red - green - refactor cycles;
- Writing integration tests as Cucumber scenarios;
- Writing controller tests using RSpec with mocking approach;
- Writing model specs with RSpec;
- How to collaborate via pull requests and continuous integration.
The book is free, and you can download it today.
Let us know what you think and what else you’d like to learn about testing Rails applications in the comments below, or via email. Happy building!