Effective Testing with RSpec 3 by Myron Marston

Effective Testing with RSpec 3 by Myron Marston

Author:Myron Marston
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
Publisher: Pragmatic Bookshelf


It’s easy for your spec_helper file to get bogged down with code that you don’t need for every spec, turning a spec run that would normally finish in hundreds of milliseconds into a multisecond “I wonder what’s interesting on Twitter?” slog.

You’ll have a much more enjoyable TDD experience if you limit spec_helper to load just the dependencies you always want. If you need a library just for a subset of specs, load it conditionally by doing one of the following:

Add a when_first_matching_example_defined hook inside your Rspec.configure block



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.