O'Reilly logo

Effective Testing with RSpec 3 by Myron Marston, Ian Dees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix 2Using RSpec with Rails

Throughout this book, we’ve barely mentioned Rails, even though it’s the most popular Ruby framework. This lack of emphasis is intentional. We find that if your testing fundamentals are solid and if you know how to use RSpec in a non-Rails context, it’s easy to apply that knowledge to a Rails app—but not the inverse. In short, everything we’ve covered in this book applies to Rails apps.

With that said, we’d like to show you a few conveniences RSpec offers for testing Rails applications. In this appendix, we’re going to show you how to configure a Rails app for testing with RSpec. We’ve also prepared some cheat sheets cataloging the features provided for working with Rails apps.

For more detailed Rails-specific ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required