CARVIEW |
Every repository with this icon (

Every repository with this icon (

Description: | TextMate bundle for Cucumber - fork of RSpec Story Runner bundle |
Homepage: | https://www.benmabey.com |
Clone URL: |
git://github.com/bmabey/cucumber-tmbundle.git
Give this clone URL to anyone.
git clone git://github.com/bmabey/cucumber-tmbundle.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Thu Sep 18 22:21:14 -0700 2008 | generating plaintext syntax file off of cucumbe... [bmabey] |
![]() |
Commands/ | Fri Oct 24 10:55:40 -0700 2008 | run feature works from step file again [bmabey] |
![]() |
Preferences/ | Tue Dec 09 08:17:05 -0800 2008 | removing dup file [bmabey] |
![]() |
README.textile | Mon Dec 08 20:56:37 -0800 2008 | single and double quotes are now highlighted co... [bmabey] |
![]() |
Snippets/ | Thu Oct 23 16:32:37 -0700 2008 | Use the new BDD style [aslakhellesoy] |
![]() |
Support/ | Sat Nov 22 04:21:32 -0800 2008 | using new my_feature_file.feature:42 line numbe... [drnic] |
![]() |
Syntaxes/ | Mon Dec 08 20:56:37 -0800 2008 | single and double quotes are now highlighted co... [bmabey] |
![]() |
color_themes/ | Thu Oct 23 12:14:59 -0700 2008 | Added the Sunburst theme [johnnyt] |
![]() |
info.plist | Wed Sep 17 11:23:26 -0700 2008 | adding the running feature command and some gen... [bmabey] |
Textmate Bundle for Cucumber
This is a fork of the rspec-story-tmbundle. The goal is to keep the same functionality that the original bundle had but make it compatible with Cucumber and also take advantage of the benefits that Cucumber offers.
So far the basic file switching and syntax highlighting is working. You can also run a feature. (See below.) File creation and more advanced step generation commands have not yet been ported fully. Feel free to help out. :)
If you are doing ruby development with webrat you may also want the webrat bundle.
Bundle Features:
- Color highlighting for plain text features (supports all the languages that Cucumber does)
- Snippets for plain text features and step files.
- Predefined completions (escape key) for common feature keywords.
- Spellchecking turned on by default for the plain text features.
- Switch between plain text feature and corresponding step matcher file.
- Run a feature with HTML output.
- Run a single scenario with HTML output.
TODO:
- Add a Goto Step command
- Automatically create template step file with pending steps based on the steps used in the feature.
- Use Cucumber’s built in functionality to do this and clean out the story bundle’s way.
- Tidy up HTML output and add a Textmate formatter with a clickable backtrace.
- Snippets for tables.
- Multi-language support for the snippets?
Installation
mkdir -p ~/Library/Application\ Support/TextMate/Bundles/ cd ~/Library/Application\ Support/TextMate/Bundles git clone git://github.com/bmabey/cucumber-tmbundle.git Cucumber.tmbundle
- In TextMate: From your drop down menu, select Bundles -> Bundle Editor -> Reload Bundles.
- To install the color themes for the syntax highlighting:
- Click on the themes found in the color_themes dir by clicking on them in Finder.
Migrating from RSpec Story Runner Bundle
To avoid file detection collisions with the RSpec Story bundle I would suggest you turn it off when using the Cucumber bundle and vice-versa. You can do this by clicking on the ‘Filter List’ button in the Bundle Editor section of Textmate. (Warning: Switching to the Cucumber color themes will clobber the Story runner color themes when you reinstall the theme.)
Updating
Update your bundle by running the “Update Cucumber Bundle” command. (Thanks to Tim Harper for this.)
Running Features
The bundle uses the ‘cucumber’ command by default to run the features. If you have a “script/cucumber” located in youre project (i.e. you’re using cucumber as a rails plugin) it will use that local version instead. You may override the default running options a number of ways. To change them globally you can set a TM_CUCUMBER_OPTS variable in textmate.
If you have cucumber profiles defined in your cucumber.yml file you can direct the bundle to run a certain feature with that profile by annotating the feature with a comment like so:# profile watirThe above annotation would run “cucumber file.feature—profile watir”. To run a feature with a cucumber rake task instead of the cucumber command you may similarly annotate the feature directing which task to use:
# rake features:watirRake is generally loads slower than the stand-alone cucumber command so this option is not the recommend.
Switching Between Features and Step files
The file switching relies on the following directory structure convention:Basic features (no sub-directories): /project_root/features |- basic_feature.feature (extension must be .feature) |- support |- env.rb |- step_definitions |- basic_feature_steps.rb Using feature sub-directories: /project_root/features |- feature_one | |- some_feature.feature | |- step_definitions | |- some_feature_steps.rb | |- feature_two | .....
These directory structures can be used together (basic features can reside in the root features directory, and feature sets can be put in sub directories).
Credits
- Ben Mabey – Author/Main contributor
- John Thornton – Author/Main contributor
- Andre Foeken – Original color syntax highlighting
- Tim Harper – Update Bundle Command, file detection bug fixes
- Aslak Hellesøy – Rake task improvement, snippet updates, Cucumber!
- Dr. Nic – Snippet and grammar updates, updated ‘Run Focused Scenario’ command
- Pedro Visintin – Syntax fix