public
Fork of wycats/merb-plugins
Description: Merb Plugins: Even more modules to hook up your Merb installation
Homepage: http://www.merbivore.com
Clone URL: git://github.com/gwynm/merb-plugins.git
Gwyn Morfey (author)
Wed Apr 16 03:58:11 -0700 2008
commit  13beef0e31151c7121baa3f8df595e174ed7e80b
tree    f5722b8af97db1ab24cc40bdd2295e5c7e611ae6
parent  f35d84c0b5b971ded6c0b698884d2d71707ee091
merb-plugins / merb_stories
name age message
..
file LICENSE Mon Mar 03 16:05:03 -0800 2008 Moved merb_rspec to merb_stories. Moved the rs... [benburkert]
file README Loading commit data...
file Rakefile
file TODO Sat Feb 02 03:29:25 -0800 2008 first commit [Yehuda Katz]
directory lib/
directory rspec_generators/
merb_stories/README
merb-rspec
=========

A plugin for the Merb framework that provides helper functionality for the rSpec testing framework.


== Stories
  merb-rspec supports rSpec story generation for regular Merb apps.  See http://rspec.info for more information 
  on using rSpec plain text stories.
  
  When using the generators for the first time, a few extra helper files will be generated.

=== Generation Examples

==== Simple
  To generate a simple story use:
  
  {{{merb-gen story my_story}}}
  
  This will generate all files needed to support that story.  
    - steps/my_story.rb
    - stories/my_story
    - stories/my_story.rb
    
==== Complex
  You can keep your stories organized by putting stories into sub-directories.  To do this with the generator use:
  
  {{{merb-gen story complex/story_group/story_file}}}
  
  This will generate the following files:
    - steps/complex_story_group_story_file.rb
    - stories/complex/story_group/story_file
    - stories/complex/story_group/story_file.rb

=== Usage Examples
  merb_stories has a rake task for running your stories.  To include it you need to make merb_stories a dependency in 
  your app.
  
  To make the rake file available, in config/init.rb include the following line:
  {{{dependency "merb_stories" if Merb.environment == "test"}}}

  Once you have the rake file available you can run the stories:
  
  rake story[my_story]
  
  OR for complex examples
  
  rake story[complex/story_group/story_file]
  
  OR to run all the stories
  
  rake story[all]

  Note that you need to supply the square brackets, and (depending on your shell) may need to escape them. For example, 
  to run the 'login' story from bash you would enter: 

  {{{rake story\[login\]}}}