-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from showaltb/add-annotations-config
Add annotations configuration in generator
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 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,23 @@ | ||
@requires-rails-version-42 | ||
Feature: Annotations | ||
|
||
I order to track my development progress | ||
As a developer | ||
I should be able to list annotations in my features | ||
|
||
Background: | ||
Given I have created a new Rails app "test-app" with no database and installed cucumber-rails | ||
And I write to "features/tests.feature" with: | ||
""" | ||
Feature: Tests | ||
Scenario: Tests | ||
# TODO: When I go to the products page | ||
""" | ||
|
||
Scenario: See annotations in .feature file | ||
When I run `bundle exec rake notes` | ||
Then it should pass with: | ||
""" | ||
features/tests.feature: | ||
* [ 3] [TODO] When I go to the products page | ||
""" |
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,12 @@ | ||
module VersionHooksHelper | ||
def rails_version | ||
@rails_version ||= `bundle exec rails --version`.match(/[\d.]+$/).to_s | ||
end | ||
end | ||
|
||
Before '@requires-rails-version-42' do | ||
extend VersionHooksHelper | ||
if Gem::Version.new(rails_version) < Gem::Version.new('4.2') | ||
skip_this_scenario | ||
end | ||
end |
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