Permalink
Browse files

Remove assertions on fixing a trailing period in task descriptions

Beginning in v10.1, Rake removes the trailing period of task
descriptions. In Cucumber features, rather than sniff the Rake version
and assert on Cape's behavior that adds a trailing period if necessary,
we're doing away with the broken assertions which cover hardly-critical
functionality.
  • Loading branch information...
1 parent 233c19d commit 21443861bbdb4d18141f9a57f448aff6ad63abb0 @njonsson committed Nov 13, 2013
Showing with 115 additions and 179 deletions.
  1. +0 −6 features/dsl/each_rake_task/unqualified.feature
  2. +1 −1 features/dsl/each_rake_task/with_defined_namespace.feature
  3. +4 −4 features/dsl/each_rake_task/with_defined_task.feature
  4. +2 −2 features/dsl/each_rake_task/with_undefined_task_or_namespace.feature
  5. +3 −3 features/dsl/mirror_rake_tasks/inside_capistrano_namespace.feature
  6. +10 −56 features/dsl/mirror_rake_tasks/unqualified.feature
  7. +9 −9 features/dsl/mirror_rake_tasks/with_cd.feature
  8. +3 −3 features/dsl/mirror_rake_tasks/with_cd_and_environment_variables.feature
  9. +1 −1 features/dsl/mirror_rake_tasks/with_defined_namespace.feature
  10. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task.feature
  11. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task_and_cd.feature
  12. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task_and_cd_and_environment_variables.feature
  13. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task_and_environment_variables.feature
  14. +1 −1 features/dsl/mirror_rake_tasks/with_defined_task_and_rename.feature
  15. +1 −1 features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_cd.feature
  16. +1 −1 features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_cd_and_environment_variables.feature
  17. +1 −1 features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_environment_variables.feature
  18. +1 −1 features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_valid_options.feature
  19. +1 −1 features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_valid_options_and_cd.feature
  20. +1 −1 ...ake_tasks/with_defined_task_and_rename_and_valid_options_and_cd_and_environment_variables.feature
  21. +1 −1 ...irror_rake_tasks/with_defined_task_and_rename_and_valid_options_and_environment_variables.feature
  22. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options.feature
  23. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options_and_cd.feature
  24. +7 −7 ...sl/mirror_rake_tasks/with_defined_task_and_valid_options_and_cd_and_environment_variables.feature
  25. +7 −7 features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options_and_environment_variables.feature
  26. +3 −3 features/dsl/mirror_rake_tasks/with_environment_variables.feature
  27. +2 −2 features/dsl/mirror_rake_tasks/with_undefined_task_or_namespace.feature
  28. +3 −3 features/dsl/mirror_rake_tasks/with_valid_options.feature
  29. +3 −3 features/dsl/mirror_rake_tasks/with_valid_options_and_cd.feature
  30. +3 −3 features/dsl/mirror_rake_tasks/with_valid_options_and_cd_and_environment_variables.feature
  31. +3 −3 features/dsl/mirror_rake_tasks/with_valid_options_and_environment_variables.feature
  32. +1 −1 features/dsl/rake_executable.feature
  33. +0 −12 features/step_definitions.rb
@@ -45,17 +45,11 @@ Feature: The #each_rake_task DSL method
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"
"""
@@ -35,4 +35,4 @@ Feature: The #each_rake_task DSL method with an argument of a defined namespace
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"
+ And the output should not contain "long"
@@ -9,7 +9,7 @@ Feature: The #each_rake_task DSL method with an argument of a defined task
And a Capfile with:
"""
Cape do
- each_rake_task 'with_period' do |t|
+ each_rake_task 'long' do |t|
$stdout.puts '', "Name: #{t[:name].inspect}"
if t[:parameters]
$stdout.puts "Parameters: #{t[:parameters].inspect}"
@@ -24,8 +24,8 @@ Feature: The #each_rake_task DSL method with an argument of a defined task
Then the output should contain:
"""
- Name: "with_period"
- Description: "Ends with period."
+ 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 not contain "without_period"
+ And the output should not contain "with_one_arg"
And the output should not contain "my_namespace"
@@ -9,7 +9,7 @@ Feature: The #each_rake_task DSL method with an undefined task or namespace
And a Capfile with:
"""
Cape do
- each_rake_task 'period' do |t|
+ each_rake_task 'lon' do |t|
$stdout.puts '', "Name: #{t[:name].inspect}"
if t[:parameters]
$stdout.puts "Parameters: #{t[:parameters].inspect}"
@@ -21,4 +21,4 @@ Feature: The #each_rake_task DSL method with an undefined task or namespace
end
"""
When I run `cap -vT`
- Then the output should not contain "period"
+ Then the output should not contain "lon"
@@ -17,7 +17,7 @@ Feature: The #mirror_rake_tasks DSL method, inside a Capistrano namespace
When I run `cap -vT`
Then the output should contain:
"""
- cap ns:with_period # Ends with period.
+ cap ns:long # My long task -- it has a ve...
"""
Scenario: mirror a Rake task with its implementation
@@ -32,8 +32,8 @@ Feature: The #mirror_rake_tasks DSL method, inside a Capistrano namespace
end
end
"""
- When I run `cap ns:with_period`
+ When I run `cap ns:long`
Then the output should contain:
"""
- * executing `ns:with_period'
+ * executing `ns:long'
"""
@@ -15,14 +15,6 @@ Feature: The #mirror_rake_tasks DSL method
When I run `cap -vT`
Then the output should contain:
"""
- cap with_period # Ends with period.
- """
- And the output should contain:
- """
- cap without_period # Ends without period.
- """
- And the output should contain:
- """
cap long # My long task -- it has a ve...
"""
And the output should contain:
@@ -54,26 +46,28 @@ Feature: The #mirror_rake_tasks DSL method
cap hidden_task #
"""
- Scenario: mirror Rake task 'with_period' with its description
+ Scenario: mirror Rake task 'long' with its description
Given a full-featured Rakefile
And a Capfile with:
"""
Cape do
mirror_rake_tasks
end
"""
- When I run `cap -e with_period`
+ When I run `cap -e long`
Then the output should contain exactly:
"""
------------------------------------------------------------
- cap with_period
+ cap long
------------------------------------------------------------
- Ends with period.
+ 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.
"""
- Scenario: mirror Rake task 'with_period' with its implementation
+ Scenario: mirror Rake task 'long' with its implementation
Given a full-featured Rakefile
And a Capfile with:
"""
@@ -83,54 +77,14 @@ Feature: The #mirror_rake_tasks DSL method
mirror_rake_tasks
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
- """
-
- Scenario: mirror Rake task 'without_period' with its description
- Given a full-featured Rakefile
- And a Capfile with:
- """
- Cape do
- mirror_rake_tasks
- end
- """
- When I run `cap -e without_period`
- Then the output should contain exactly:
- """
- ------------------------------------------------------------
- cap without_period
- ------------------------------------------------------------
- Ends without period.
-
-
- """
-
- Scenario: mirror Rake task 'long' with its description
- Given a full-featured Rakefile
- And a Capfile with:
- """
- Cape do
- mirror_rake_tasks
- end
- """
- When I run `cap -e long`
- Then the output should contain exactly:
- """
- ------------------------------------------------------------
- cap long
- ------------------------------------------------------------
- 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.
-
-
+ `long' is only run for servers matching {}, but no servers matched
"""
Scenario: mirror Rake task 'with_one_arg' with its description
@@ -16,14 +16,14 @@ Feature: The #mirror_rake_tasks DSL method with a different directory
end
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
Scenario: mirror a Rake task with its implementation, using a Capistrano variable inside a block
@@ -38,14 +38,14 @@ Feature: The #mirror_rake_tasks DSL method with a different directory
end
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
Scenario: mirror a Rake task with its implementation, using a string
@@ -58,12 +58,12 @@ Feature: The #mirror_rake_tasks DSL method with a different directory
end
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
@@ -18,12 +18,12 @@ Feature: The #mirror_rake_tasks DSL method with a different directory and enviro
end
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
@@ -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 "period"
+ And the output should not contain "long"
Scenario: mirror a Rake task that shadows the matching namespace with its implementation
Given a full-featured Rakefile
@@ -9,15 +9,15 @@ Feature: The #mirror_rake_tasks DSL method with a defined task
And a Capfile with:
"""
Cape do
- mirror_rake_tasks :with_period
+ mirror_rake_tasks :long
end
"""
When I run `cap -vT`
Then the output should contain:
"""
- cap with_period # Ends with period.
+ cap long # My long task -- it has a very, very, very, very, very, very, ver...
"""
- And the output should not contain "without_period"
+ And the output should not contain "with_one_arg"
And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
@@ -27,15 +27,15 @@ Feature: The #mirror_rake_tasks DSL method with a defined task
set :current_path, '/current/path'
Cape do
- mirror_rake_tasks 'with_period'
+ mirror_rake_tasks 'long'
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
@@ -9,17 +9,17 @@ Feature: The #mirror_rake_tasks DSL method with a defined task and a different d
And a Capfile with:
"""
Cape do
- mirror_rake_tasks :with_period do |recipes|
+ mirror_rake_tasks :long do |recipes|
recipes.cd { release_path }
end
end
"""
When I run `cap -vT`
Then the output should contain:
"""
- cap with_period # Ends with period.
+ cap long # My long task -- it has a very, very, very, very, very, very, ver...
"""
- And the output should not contain "without_period"
+ And the output should not contain "with_one_arg"
And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
@@ -29,17 +29,17 @@ Feature: The #mirror_rake_tasks DSL method with a defined task and a different d
set :release_path, '/release/path'
Cape do
- mirror_rake_tasks :with_period do |recipes|
+ mirror_rake_tasks :long do |recipes|
recipes.cd { release_path }
end
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
@@ -9,7 +9,7 @@ Feature: The #mirror_rake_tasks DSL method with a defined task, a different dire
And a Capfile with:
"""
Cape do
- mirror_rake_tasks :with_period do |recipes|
+ mirror_rake_tasks :long do |recipes|
recipes.cd { release_path }
recipes.env['RAILS_ENV'] = lambda { rails_env }
end
@@ -18,9 +18,9 @@ Feature: The #mirror_rake_tasks DSL method with a defined task, a different dire
When I run `cap -vT`
Then the output should contain:
"""
- cap with_period # Ends with period.
+ cap long # My long task -- it has a very, very, very, very, very, very, ver...
"""
- And the output should not contain "without_period"
+ And the output should not contain "with_one_arg"
And the output should not contain "my_namespace"
Scenario: mirror the matching Rake task with its implementation
@@ -31,18 +31,18 @@ Feature: The #mirror_rake_tasks DSL method with a defined task, a different dire
set :rails_env, 'rails-env'
Cape do
- mirror_rake_tasks :with_period do |recipes|
+ mirror_rake_tasks :long do |recipes|
recipes.cd { release_path }
recipes.env['RAILS_ENV'] = lambda { rails_env }
end
end
"""
- When I run `cap with_period`
+ When I run `cap long`
Then the output should contain:
"""
- * executing `with_period'
+ * executing `long'
"""
And the output should contain:
"""
- `with_period' is only run for servers matching {}, but no servers matched
+ `long' is only run for servers matching {}, but no servers matched
"""
Oops, something went wrong.

0 comments on commit 2144386

Please sign in to comment.