-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
86 lines (65 loc) · 3.17 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Textmate Bundle for RSpec plain text stories
How to install:
mkdir -p ~/Library/Application\ Support/TextMate/Bundles/
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/bmabey/rspec-story-tmbundle.git RSpec\ Story.tmbundle
In TextMate:
From your drop down menu, select Bundles -> Bundle Editor -> Reload Bundles
If you are doing ruby development with webrat you may also want the webrat bundle:
http://github.com/bmabey/webrat-tmbundle/
Features:
* Color highlighting for plain text stories
* Themes that have been modified to take advantage of this can be found in color_themes/
* Snippets for plain text stories and step files.
* Predefined completions (escape key) for common story keywords.
* Spellchecking turned on by default for the plaintext stories.
* Run the current plain text story and display in HTML. Clickable backtrace and all.
* Switch between plain text story and corresponding step matcher file.
* Automatically create template step file with pending steps based on the steps used in the story.
Caveats:
* Requires RSpec 1.1.4
* The running of stories and file switching relies on the following directory structure convention:
Basic stories (no sub-directories):
/project_root/stories
|- basic_story.rb
|- stories
| |- basic_story.story (extension must be .story)
|
|- steps
|- basic_story_steps.rb
Using feature sub-directories:
/project_root/stories
|- feature_one
| |- some_story.rb
| |- stories
| | |- some_story.story (extension must be .story)
| |
| |- steps
| |- some_story_steps.rb
|
|- feature_two
| .....
These directory structures can be used together (basic stories can reside in the root stories directory, and feature sets can be put in sub directories).
TODO:
* 6/1/2008 4:10AM - If in story file, and are switching to any other file, if a runner file doesn't exist
- prompt to create it (right now - going to specific step from story file dies if not)
* Run All Stories command.
* Run Selected Stories command.
* (MAYBE) Make running a story more robust to work with any configuration.
* Warning / prompt about creating step runner file (when creating either a story or a steps file)
TODONE:
* Improve HTML output to show failing information.
* If in story file, and step file doesn't exist, and going to specific step - make snippets work correctly
- currently inserts new step and tag name of step file - steps_for(:Given "blah blah" ...)
* When in step file - if doing SHIFT-CTRL-OPTION-DOWN - go to first step that match
* Switch Command
* Easily switch between a plain text story and it's runner ruby file.
* Step Navigation
* Be able to quickly navigate to the step files that are being used for the current story.
* Automatically go to the selected step or create it if it does not exist.
Authors:
John Thornton
Ben Mabey
Original language part of the bundle taken from:
http://www.movesonrails.com/articles/2007/11/06/rspec-plain-text-stories
this was improved upon by John, Ben, and Jake Cahoon.