cucumber-slices¶ ↑
Are long step definition files grating on your nerves?
See your step definitions right under your cucumber features!
Install¶ ↑
gem install cucumber-slices
Gist¶ ↑
Say you have a feature called tic-tac-toe and you have written steps for it Just type
cucumber-slices features/tic-tac-toe.feature
and get something like this…
6 Scenario: Begin Game 7 Given I start a new Tic-Tac-Toe game @game = TicTacToe.new 8 When I enter my name Renee @game.player = name 9 Then the computer welcomes me to the game with "Welcome Renee" @game.welcome_player.should eq arg1 10 And randomly chooses who goes first [@game.player, "Computer"].should include @game.current_player 11 And who is X and who is O TicTacToe::SYMBOLS.should include @game.player_symbol, @game.computer_symbol
This way you can see the steps for each feature directly under the features so it’s easier to read.
Usage¶ ↑
cucumber-slices <feature_file> [--lines=<line_range>]
You can also specify line numbers in the feature file if you want to limit the output.
TODO¶ ↑
-
Make the regexps more robust.
-
Syntax highlighting
-
Add more tests.
Contributing¶ ↑
Feel free to add an issue or do a pull request.
Copyright¶ ↑
Copyright © 2014 psytau. See LICENSE.txt for further details.
<img src=“https://travis-ci.org/psytau/cucumber-slices.png?branch=master” alt=“Build Status” />