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

Using Parts of RSpec With Other Test Frameworks

Sometimes, you’ll want to use the powerful test doubles available in rspec-mocks, or the composable matchers provided by rspec-expectations, in a project where the rest of RSpec isn’t a good fit. For instance, you may already have an extensive test suite written in Minitest, or you may be writing acceptance tests in Cucumber.[124][125]

Both of these parts of RSpec are easy to use with other test frameworks, or even without a test framework at all. In fact, you’ve already done so in Parts of an Expectation and throughout Chapter 13, Understanding Test Doubles.

If you’re using Minitest, RSpec provides a couple of conveniences for you, including the following:

  • Reporting unmet expectations correctly ...

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