Permalink
Browse files

Reorganize, prune, and expand Cucumber features

  • Loading branch information...
1 parent 14ca2fa commit d4ac53e4c9185ab0f8fcded03cbfc5a30e6d0490 @njonsson committed Feb 25, 2013
View
53 .../each_rake_task/without_arguments.feature → ...es/dsl/each_rake_task/unqualified.feature
@@ -1,4 +1,4 @@
-Feature: The #each_rake_task DSL method without arguments
+Feature: The #each_rake_task DSL method
In order to use the metadata of Rake tasks in my Capistrano recipes,
As a developer using Cape,
@@ -25,58 +25,37 @@ Feature: The #each_rake_task DSL method without arguments
Then the output should contain:
"""
- Name: "with_period"
- Description: "Ends with period."
- """
- And the output should contain:
- """
-
- Name: "without_period"
- Description: "Ends without period"
- """
- And the output should contain:
- """
+ Name: "hidden_task"
+ Description: ""
Name: "long"
Description: "My long task -- it has a very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very long description"
- """
- And the output should contain:
- """
-
- Name: "with_one_arg"
- Parameters: ["the_arg"]
- Description: "My task with one argument"
- """
- And the output should contain:
- """
Name: "my_namespace"
Description: "A task that shadows a namespace"
Default
- """
- And the output should contain:
- """
Name: "my_namespace:in_a_namespace"
Description: "My task in a namespace"
- """
- And the output should contain:
- """
Name: "my_namespace:my_nested_namespace:in_a_nested_namespace"
Description: "My task in a nested namespace"
- """
- And the output should contain:
- """
- Name: "with_two_args"
- Parameters: ["my_arg1", "my_arg2"]
- Description: "My task with two arguments"
- """
- And the output should contain:
- """
+ Name: "with_one_arg"
+ Parameters: ["the_arg"]
+ Description: "My task with one argument"
+
+ Name: "with_period"
+ Description: "Ends with period."
Name: "with_three_args"
Parameters: ["an_arg1", "an_arg2", "an_arg3"]
Description: "My task with three arguments"
+
+ Name: "with_two_args"
+ Parameters: ["my_arg1", "my_arg2"]
+ Description: "My task with two arguments"
+
+ Name: "without_period"
+ Description: "Ends without period"
"""
View
15 ...k/with_defined_namespace_argument.feature → ..._rake_task/with_defined_namespace.feature
@@ -22,28 +22,17 @@ Feature: The #each_rake_task DSL method with an argument of a defined namespace
end
"""
When I run `cap -vT`
- Then the output should not contain:
- """
-
- Name: "with_period"
- Description: "Ends with period."
- """
- And the output should contain:
+ Then the output should contain:
"""
Name: "my_namespace"
Description: "A task that shadows a namespace"
Default
- """
- And the output should contain:
- """
Name: "my_namespace:in_a_namespace"
Description: "My task in a namespace"
- """
- And the output should contain:
- """
Name: "my_namespace:my_nested_namespace:in_a_nested_namespace"
Description: "My task in a nested namespace"
"""
+ And the output should not contain "with_period"
View
8 ...e_task/with_defined_task_argument.feature → .../each_rake_task/with_defined_task.feature
@@ -27,9 +27,5 @@ Feature: The #each_rake_task DSL method with an argument of a defined task
Name: "with_period"
Description: "Ends with period."
"""
- And the output should not contain:
- """
-
- Name: "without_period"
- Description: "Ends without period"
- """
+ And the output should not contain "without_period"
+ And the output should not contain "my_namespace"
View
53 features/dsl/each_rake_task/with_undefined_argument.feature
@@ -1,53 +0,0 @@
-Feature: The #each_rake_task DSL method with an undefined argument
-
- In order to use the metadata of Rake tasks in my Capistrano recipes,
- As a developer using Cape,
- I want to use the Cape DSL.
-
- Scenario: do not enumerate any Rake tasks for a completely unrecognized argument
- Given a full-featured Rakefile
- And a Capfile with:
- """
- Cape do
- each_rake_task :this_does_not_exist do |t|
- $stdout.puts '', "Name: #{t[:name].inspect}"
- if t[:parameters]
- $stdout.puts "Parameters: #{t[:parameters].inspect}"
- end
- if t[:description]
- $stdout.puts "Description: #{t[:description].inspect}"
- end
- end
- end
- """
- When I run `cap -vT`
- Then the output should not contain:
- """
-
- Name: "with_period"
- Description: "Ends with period."
- """
-
- Scenario: do not enumerate any Rake tasks for a partially recognized argument
- Given a full-featured Rakefile
- And a Capfile with:
- """
- Cape do
- each_rake_task :period do |t|
- $stdout.puts '', "Name: #{t[:name].inspect}"
- if t[:parameters]
- $stdout.puts "Parameters: #{t[:parameters].inspect}"
- end
- if t[:description]
- $stdout.puts "Description: #{t[:description].inspect}"
- end
- end
- end
- """
- When I run `cap -vT`
- Then the output should not contain:
- """
-
- Name: "with_period"
- Description: "Ends with period."
- """
View
24 features/dsl/each_rake_task/with_undefined_task_or_namespace.feature
@@ -0,0 +1,24 @@
+Feature: The #each_rake_task DSL method with an undefined task or namespace
+
+ In order to use the metadata of Rake tasks in my Capistrano recipes,
+ As a developer using Cape,
+ I want to use the Cape DSL.
+
+ Scenario: do not enumerate any Rake tasks
+ Given a full-featured Rakefile
+ And a Capfile with:
+ """
+ Cape do
+ each_rake_task 'period' do |t|
+ $stdout.puts '', "Name: #{t[:name].inspect}"
+ if t[:parameters]
+ $stdout.puts "Parameters: #{t[:parameters].inspect}"
+ end
+ if t[:description]
+ $stdout.puts "Description: #{t[:description].inspect}"
+ end
+ end
+ end
+ """
+ When I run `cap -vT`
+ Then the output should not contain "period"
View
4 features/dsl/mirror_rake_tasks/unqualified.feature
@@ -49,6 +49,10 @@ Feature: The #mirror_rake_tasks DSL method
"""
cap with_three_args # My task with three arguments.
"""
+ And the output should contain:
+ """
+ cap hidden_task #
+ """
Scenario: mirror Rake task 'with_period' with its description
Given a full-featured Rakefile
View
2 ...s/with_defined_namespace_argument.feature → ...rake_tasks/with_defined_namespace.feature
@@ -25,7 +25,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined namespace
"""
cap my_namespace:my_nested_namespace:in_a_nested_namespace # My task in a nested namespace.
"""
- And the output should not contain "cap with_period"
+ And the output should not contain "period"
Scenario: mirror a Rake task that shadows the matching namespace with its implementation
Given a full-featured Rakefile
View
1 features/dsl/mirror_rake_tasks/with_defined_task.feature
@@ -18,6 +18,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined task
cap with_period # Ends with period.
"""
And the output should not contain "without_period"
+ And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
Given a full-featured Rakefile
View
1 features/dsl/mirror_rake_tasks/with_defined_task_and_environment_variables.feature
@@ -20,6 +20,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined task and environment v
cap with_period # Ends with period.
"""
And the output should not contain "without_period"
+ And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
Given a full-featured Rakefile
View
3 features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options.feature
@@ -1,4 +1,4 @@
-Feature: The #mirror_rake_tasks DSL method a defined task, valid options, and environment variables
+Feature: The #mirror_rake_tasks DSL method a defined task, valid options
In order to include Rake tasks with descriptions in my Capistrano recipes,
As a developer using Cape,
@@ -18,6 +18,7 @@ Feature: The #mirror_rake_tasks DSL method a defined task, valid options, and en
cap with_period # Ends with period.
"""
And the output should not contain "without_period"
+ And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
Given a full-featured Rakefile
View
1 ...l/mirror_rake_tasks/with_defined_task_and_valid_options_and_environment_variables.feature
@@ -20,6 +20,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined task, valid options, a
cap with_period # Ends with period.
"""
And the output should not contain "without_period"
+ And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
Given a full-featured Rakefile
View
5 features/dsl/mirror_rake_tasks/with_undefined_task_or_namespace.feature
@@ -9,9 +9,8 @@ Feature: The #mirror_rake_tasks DSL method with an undefined task or namespace
And a Capfile with:
"""
Cape do
- mirror_rake_tasks :this_does_not_exist
+ mirror_rake_tasks 'period'
end
"""
When I run `cap -vT`
- Then the output should not contain "cap this_does_not_exist"
- And the output should not contain "cap with_period"
+ Then the output should not contain "period"

0 comments on commit d4ac53e

Please sign in to comment.