# Short Feedback Cycles

DevFeed: [Short Feedback Cycles](<https://devfeed.tech/articles/short-feedback-cycles-21027.md>)

Original publisher: [Read original article](<https://jakeyesbeck.com/2015/06/07/short-feedback-cycles/>)

Published: 2015-06-07T12:00:00Z

Content type: article

Language: en

Sources: [Jake Yesbeck](<https://devfeed.tech/sources/jake-yesbeck.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [RSpec](<https://devfeed.tech/topics/rspec.md>), [Development](<https://devfeed.tech/topics/development.md>), [Code](<https://devfeed.tech/topics/code.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [development](<https://devfeed.tech/tags/development.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

The article explains how automated tests and short feedback cycles improve software development. It distinguishes unit and integration tests, emphasizes fast test suites for preventing bugs and easing feature work and refactoring, and describes using Guard to run RSpec tests automatically when code changes.

## Source excerpt

Forty-two days into my year of commits initiative has come and gone. With it, I have found some great processes for making my contributions efficient and effective. Feedback is extremely important when writing software. After all, the code you write is probably designed to work, right? Right. A good way to verify correctness in your software is through automated tests. These can either be unit tests for specific methods and functions or integration tests; those that make sure a complete code path behaves as expected. Regardless, we write these tests to ensure our code works now and in the future. "In the future" is where I have started to contribute to projects. Good projects have test files that the original author(s) provide. Great projects have fast test files that the original author(s) provide. Fast tests provide short feedback cycles. Short feedback cycles prevent bugs and help make new feature development and refactoring much more painless. Feedback governs our behaviors in and outside the development world. Without it, we would not be as efficient or effective at the tasks that are important to us. From writing software to training for a half marathon, feedback matters a great deal. In a recent contribution of mine, I relied heavily on automated testing and short feedback cycles. It was important to me that I was able to identify how the specs were changing as I upgraded them to RSpec 3. I used Guard to help run my tests automatically when any of the code changed. Guard is a tool to automatically run your automated test files as you are making changes to the code. Guard has been around for a long time. I chose to use it due to how simple it is to set up. All you need to do is include the guard-rspec gem in your repository create a Guardfile. An example Guardfile (which exists in the root of your repository) would look something like this: guard :rspec, cmd: 'rspec', notification: false do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/li