-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature for CoffeeScript support (close #29)
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 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,11 @@ | ||
Feature: CoffeeScript support | ||
In order to use the JS dialect I'm most comfortable with | ||
As a step definition implementor | ||
I want to use CoffeeScript for writing step definitions | ||
|
||
Scenario: CoffeeScript step definition | ||
Given a mapping written in CoffeeScript | ||
When Cucumber executes a scenario using that mapping | ||
Then the feature passes | ||
And the mapping is run | ||
|
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file contains step definitions which are relevant to | ||
# Cucumber.js feature suite only. | ||
|
||
Given /^a mapping written in CoffeeScript$/ do | ||
write_coffee_script_definition_file | ||
end | ||
|
||
When /^Cucumber executes a scenario using that mapping$/ do | ||
write_feature <<-EOF | ||
Feature: | ||
Scenario: | ||
Given a mapping | ||
EOF | ||
run_feature | ||
end | ||
|
||
Then /^the mapping is run$/ do | ||
assert_passed "a mapping" | ||
end |