Coder Social home page Coder Social logo

agiledox-rake's Introduction

Agiledox is a simple rake script, to transform your tests/specs into documentation.

There are to many versions and hacks of the [http://web.archive.org/web/20070814020139/http://www.reevoo.com/blogs/bengriffiths/2005/06/24/a-test-by-any-other-name/ original agiledox task] out there, so i grabbed them all, added sugar+refactoring+rspec and put them into one task.

Install

Drop into lib/tasks.

Output

A User:
  - should not be valid without login
  - should not be valid without email
...
A Users Controller's:
  'new' action:
    - should succeed
  'edit' action:
    - should succeed
...
A /users/edit:
  - sould show errors
  - sould have enought rows
...
A Users Helper:
...

Syntax

rake dox
rake dox:test => all files matching _test.rb
rake dox:test:units
rake dox:spec:models
...
rake spec:dox => all files matching _spec.rb
rake spec:models:dox
rake test:functionals:dox
...

test=> units,functionals,integration
spec=> models,controllers,views,helpers

Options

Set options in the agiledox_options.

:write

Default: OFF

Write the output as comment to the tested file(models/controllers only)

#AGILEDOX !WILL BE OVERWRITTEN!
#A User:
#  - should create valid user
#  - should stop invalid
#  - should not allow duplicated fields
#  - should be activated by default
#  - should only find activated
#AGILEDOX END
class User < ActiveRecord::Base
...
end

:list_nested_actions

Default: ON

test/functionals only: use the Test::Rails sheme of naming your tests: test_{action}_should....

An Users Controller's:
  'create' action:
    - should set a notice
    - should redirect to user on success
    - should redirect to index on failure
...

License: MIT

agiledox-rake's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.