Develop testable, modular, and maintainable Ruby software for the real world using RSpec
About This Book
- Explore the concept of testability and how to implement tests that deliver the most value
- Maximize the quality of your Ruby code through a wide variety of tests
- Master the real-world tradeoffs of testing through detailed examples supported by in-depth discussion
Who This Book Is For
This book is aimed at professional test engineers who are looking to automate their testing of complex systems or software engineers looking to make their code more reliable and their development process easier by using RSpec. Prior experience with automated testing and Ruby would be helpful but is not mandatory.
What You Will Learn
- Identify a unit of software for the purposes of testing
- Manage test state with hooks, fixtures, and mocks
- Handle external web services in tests using various techniques
- Configure RSpec flexibly and cleanly using support code and environment variables
- Interact with rich web apps in tests using Capybara
- Build the right feature with behavior-driven development
- Customize matchers and failure messages
- Verify correct development and production environments
In Detail
Automated testing has emerged as an important approach to improving reliability and maintainability. RSpec is one of the most mature and powerful testing tools for the Ruby programming language, and arguably for any language. Its vast array of features combined with its simple, intuitive syntax allow you to create a broad variety of automated tests, specifications, and examples. Not only can tests catch bugs, they can improve the quality of your Ruby code, encouraging modularity, and allowing changes to be made efficiently and with confidence.
In this book practical features are covered with a view to using simple, stable tools to develolÃ?