Specify
"Simplicity is the ultimate sophistication." -- Leonardo da Vinci
Specify is a test solution development tool that acts as a BDD-style micro-framework.
Specify provides a very thin wrapper around RSpec that provides a Gherkin-style syntax for use with test examples.
Installation
To get the latest stable release, add this line to your application's Gemfile:
gem 'specify'
To get the latest code:
gem 'specify', git: https://github.com/jnyman/specify
After doing one of the above, execute the following command:
$ bundle
You can also install Specify just as you would any other gem:
$ gem install specify
Usage
To use Specify you simply have to require it within your spec_helper
file:
require 'specify'
Then you simply run your rspec
command as normal against your test suite.
Why Specify?
Specify provides an internal DSL, similar to the RSpec Story Runner, which was the predecessor of the Cucumber external DSL provided by Gherkin.
Behavior Driven Development (or even just good Test Driven Development) practices put emphasis on communication. Tools like Cucumber focus on allowing communication via a test description language, structured by Gherkin keywords. However, while the ideas of Gherkin are nice, tools like Cucumber abstract away the nuts and bolts of your tests.
Abstraction can be a good thing but Cucumber gives you no choice in the matter. It hides code blocks behind a "call by regular expression" invocation mechanism instead of making those code blocks readily available in the acceptance test description.
Specify lets you write as much logic beside your specifications as you want by leveraging the RSpec ecosystem with the addition of a Gherkin-like syntax.
The wiki contains more information about Specify.
Contributing
To work on Specify:
- Fork the project.
- Create a feature branch. (
git checkout -b my-new-feature
) - Commit your changes. (
git commit -am 'new feature'
) - Push the branch. (
git push origin my-new-feature
) - Create a new pull request.
Author
License
Specify is distributed under the MIT license. See the LICENSE file for details.
Credits
Specify has been inspired by the following projects: