"Our tests are broken again!" "Why does the suite take so long to run?" "What value are we getting from these tests anyway?" Solve your testing problems by building and maintaining quality software with RSpec - the popular BDD-flavored Ruby testing framework. This definitive guide from RSpec's lead developer shows you how to use RSpec to drive more maintainable designs, specify and document expected behavior, and prevent regressions during refactoring. Build a project using RSpec to design, describe, and test the behavior of your code. Whether you're new to automated tests or have been using them for years, this book will help you write more effective tests.
RSpec has been downloaded more than 100 million times and has inspired countless test frameworks in other languages. Use this influential Ruby testing framework to iteratively develop a project with the confidence that comes from well-tested code. This book guides you through creating a Ruby project with RSpec, and explores the individual components in detail.
Start by learning the basics of installing and using RSpec. Then build a real-world JSON API, using RSpec throughout the process to drive a BDD-style outside-in workflow. Apply an effective test strategy to write fast, robust tests that support evolutionary design through refactoring. The rest of the book provides the definitive guide to RSpec's components. Use rspec-core's metadata to slice and dice your spec suite. Dig into rspec-expectations' matchers: compose them in flexible ways, specify expected outcomes with precision, and diagnose problems quickly with the help of good failure messages. Write fast, isolated tests with rspec-mocks' test doubles while pushing your code toward simpler interfaces.
The authors, with a combined 20 years of automated testing experience, share testing wisdom that will lead to a fun, productive testing experience.
What You Need:
To follow along with the book, you'll need Ruby 2.2+. The book will guide you through installing RSpec 3 and setting up a new project to use it.
"synopsis" may belong to another edition of this title.
Myron Marston, a longtime Ruby programmer, has led the development of RSpec since 2012. He works as a senior software engineer at Square. Myron tweets as @myronmarston.By day, Ian Dees slings code, tests, and puns at New Relic in Portland. By night, he converts espresso into programming books, including "Cucumber Recipes". Ian tweets as@undees.
Ruby embraces the old Lisp idea that you should "build up a language" to address your problem, and RSpec carries this approach into the world of testing. But RSpec is a big toolbox, and in order to harness its full power you need a guide. This is that guide: the bridge you need to take you from writing tests, to expressing your design requirements in code.
- Avdi Grimm, Author of Confident Ruby and Exceptional Ruby and Head Chef, RubyTapas
Effective Testing with RSpec 3 does a great job of explaining both the main features of RSpec as well as its lesser known, powerful, and often overlooked features. It's an essential resource for Rubyists looking to learn RSpec, or for those who use it every day. I've already started using it regularly as a resource.
- Noel Rappin, Author of Rails 4 Test Prescriptions and Director of Development, Table XI
Myron and Ian have written the essential "missing" manual for modern RSpec, connecting all the latest best practices for TDD and BDD.
- Sam Joseph, Co-instructor on the BerkeleyX Agile Development using Ruby on Rails MOOC and co-founder, AgileVentures Charity
Myron has been the driving force behind RSpec development for years. He is an expert on testing practices and getting the most out of the RSpec suite. His care and attention to detail are impeccable, and it shows in both the codebase and this book.
- Xavier Shay, RSpec core team member and Payments Engineering Lead, Square
Having worked with Myron for many years on the RSpec core team, I'm very pleased to see Effective Testing with RSpec 3. This book contains everything you need to learn not only how RSpec works, but how to test effectively with the framework. If you're working with RSpec on a daily basis and looking to get better at working with the framework, I could not recommend this book more heartily.
- Sam Phippen, RSpec core team member and engineer, Digital Ocean
"About this title" may belong to another edition of this title.
Shipping:
FREE
Within U.S.A.
Seller: SecondSale, Montgomery, IL, U.S.A.
Condition: Good. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Seller Inventory # 00079310976
Quantity: 5 available
Seller: SecondSale, Montgomery, IL, U.S.A.
Condition: Very Good. Item in very good condition! Textbooks may not include supplemental items i.e. CDs, access codes etc. Seller Inventory # 00077155871
Quantity: 1 available
Seller: Dream Books Co., Denver, CO, U.S.A.
Condition: acceptable. This copy has clearly been enjoyedâ"expect noticeable shelf wear and some minor creases to the cover. Binding is strong, and all pages are legible. May contain previous library markings or stamps. Seller Inventory # DBV.1680501984.A
Quantity: 1 available
Seller: BooksRun, Philadelphia, PA, U.S.A.
Paperback. Condition: Fair. 1. Heavy wear. Ship within 24hrs. Satisfaction 100% guaranteed. APO/FPO addresses supported. Seller Inventory # 1680501984-7-1-13
Quantity: 1 available
Seller: ThriftBooks-Atlanta, AUSTELL, GA, U.S.A.
Paperback. Condition: Good. No Jacket. Former library book; Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 1.44. Seller Inventory # G1680501984I3N10
Quantity: 1 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: Good. No Jacket. Former library book; Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 1.44. Seller Inventory # G1680501984I3N10
Quantity: 1 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: As New. No Jacket. Pages are clean and are not marred by notes or folds of any kind. ~ ThriftBooks: Read More, Spend Less 1.44. Seller Inventory # G1680501984I2N00
Quantity: 1 available
Seller: HPB-Red, Dallas, TX, U.S.A.
paperback. Condition: Good. Connecting readers with great books since 1972! Used textbooks may not include companion materials such as access codes, etc. May have some wear or writing/highlighting. We ship orders daily and Customer Service is our top priority! Seller Inventory # S_401925200
Quantity: 1 available
Seller: WorldofBooks, Goring-By-Sea, WS, United Kingdom
Paperback. Condition: Very Good. The book has been read, but is in excellent condition. Pages are intact and not marred by notes or highlighting. The spine remains undamaged. Seller Inventory # GOR009158010
Quantity: 2 available
Seller: HPB-Emerald, Dallas, TX, U.S.A.
Paperback. Condition: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Seller Inventory # S_424514285
Quantity: 1 available