forked from travis/lein-cuke
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Way more legitimate feature definition
Which drove the implementation of the ability to pass command line arguments. Win!
- Loading branch information
Showing
5 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: Leave this feature unimplemented | ||
So that I may drive the development of lein cuke | ||
As a busy Behavior Driven Developer | ||
I want to leave this as an unimplemented feature | ||
|
||
Scenario: This feature should remain unimplemented | ||
Given I have installed lein-cuke | ||
When I leave this feature unimplemented | ||
Then my tests should pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: Run cucumber | ||
So that I may drive feature development using cucumber | ||
As a busy Behavior Driven Developer | ||
I want this plugin to run cucumber | ||
|
||
Scenario: Our dummy features should be run by "lein cuke dummy-features" | ||
Given I have installed lein-cuke | ||
When I run "lein cuke dummy-features" | ||
Then I should see "You can implement step definitions for undefined steps with these snippets" in the output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
(require 'leiningen.core | ||
['clojure.contrib.str-utils2 :as 'str] | ||
['clojure.contrib.shell-out :as 'shell]) | ||
|
||
(def help-output (atom "")) | ||
|
||
(def output (atom "")) | ||
|
||
(Before (reset! output "")) | ||
|
||
(Given #"^I have installed lein-cuke" | ||
#()) | ||
|
||
(When #"^I run \"lein help\"" | ||
#(reset! help-output | ||
(shell/sh "lein" "help"))) | ||
(When #"^I run \"(.*)\"" | ||
#(reset! output | ||
(apply shell/sh (.split %1 " ")))) | ||
|
||
(Then #"^I should see \"cuke\" in the output" | ||
#(assert (not (= (.indexOf @help-output "cuke") -1)))) | ||
(Then #"^I should see \"(.*)\" in the output" | ||
#(assert (str/contains? @output %1))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters