Wyatt: The simple way to generate RSpec tests

This friendly Siberian Husky will take the pain out of RSpec tests


If you’re just getting started with test-driven development or are an old pro, Wyatt is a fun and helpful Chrome Extension. Wyatt, developed by Alex Grande, was created because he felt like he was always “banging his head against RSpec, dealing with those generic errors, match not found or whatever”. Alex felt there had to be a better, more effective way to do things and that’s when he started his mission to make the world a better place by improving the way we generate our tests.

What Wyatt does is record the specs while you click through the feature you’re testing.

Here are four easy steps to get the Wyatt Chrome Extension installed.

  1. Visit the Chrome Web Store .
  2. Type Wyatt in the search bar and look for the Siberian Husky icon named Wyatt.
  3. Click “Add To Chrome” and a pop-up will appear stating that it can read and change all your data on the websites you visit.
  4. Click “Add extension” and another pop-up will appear, letting you know that clicking the Siberian Husky icon will start your test.

Here’s how I used Wyatt to create a spec for a client signup.

  1. In your nav bar click the Siberian Husky icon.
  2. The Wyatt app will now open and prompt you to start recording. It will also provide two optional fields: “Describe” and “Context” along with a field for your “it” statement.
  3. I filled in my “Describe” with “Client sign up”.
  4. I filled in my “it” statement with “allows client to sign up”.
  5. Next, I clicked “Start Recording”.
  6. I filled in my form and clicked next.
  7. I clicked the Wyatt app in the nav bar so I could fill in the “expect” portion of my spec.
  8. I filled in the “expect” portion and clicked “save”.

Wyatt produced the spec from my clicks and typing in mere minutes!!!

You may notice there are two empty strings for the select boxes. If Wyatt doesn’t know how to grab a specialized element like select 2’s you will have to go and fill them in manually. Wyatt certainly gets you on your way though and is a tool I will use often.

Wyatt is an open source project and would love contributors to help it evolve.

Siberian Husky by Kazisdaman is licenced under CC BY-SA 3.0

Photo of Denise Carpenter

Denise comes from a medical background where she was a Radiographer. A career change and four years later, she’s now a full stack web developer for Collective Idea.