A small DSL that converts free text into pending tests/specs.
Add this line to your application's Gemfile:
gem 'todo_next'
And then execute:
$ bundle
Create a first spec with a todo_next skeleton:
$ cd <project>
$ todo_next stack
# => <project>/spec/stack_spec.rb was created.
$ cat spec/stack_spec.rb
# =>
require 'rubygems'
require 'rspec'
require 'todo_next'
todo_next(<<TEXT)
A Foobar
√ is white by default
ex: puts Foobar.new.colour # => 'white'
* can be resized
example:
foobar.resize!(+10, -2)
- can be reset
truthiness()
is always true
is never false
(add more tests)
TEXT
# √ == passed => same as a comment line
# * == current => leading char - '*' - is kept
# example blocks (ex:, example:) are ignored, like comments.
#describe "<what you're testing>" do
# specify 'this should happen' do
# .. some code
# end
This text is equivalent to :
describe "A Foobar" do
it '* can be resized'
it 'can be reset'
describe 'truthiness()' do
it 'is always true'
it 'is never false'
end
it '(add more tests)'
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request