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

Your Turn

In this chapter, you’ve seen how to slice and dice your specs by just about any way you can think of. You can run just the fastest examples, or the ones for a specific platform, or the ones you’re focusing for a particular task. The result is that you spend less time waiting for your specs to run, and more time writing code.

We’ve also peeled back the curtain to show you that the magic behind this flexibility is an ordinary Ruby hash. You can easily define cross-sections of your specs to fit any situation.

Now, it’s time to put this newfound experience to the test.

Exercise

When we are trying to find bottlenecks in our specs, we often look at SQL operations, one of the main sources of test slowness. It can be really useful to know which ...

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