From 859eec68c6cbf8de864ac42b8d848629c1393c5f Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Wed, 10 Dec 2014 01:08:48 +0300 Subject: [PATCH] Fix cucumber spec for loading tasks from stage configs --- CHANGELOG.md | 5 ++++- features/configuration.feature | 16 +++++++--------- features/step_definitions/assertions.rb | 4 ++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0eeac99..330cb20a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Reverse Chronological Order: https://github.com/capistrano/capistrano/compare/v3.3.3...HEAD +* Minor changes: + * Fix cucumber spec for loading tasks from stage configs (@sponomarev) + ## `3.3.3` https://github.com/capistrano/capistrano/compare/v3.2.1...v3.3.3 @@ -33,7 +36,7 @@ https://github.com/capistrano/capistrano/compare/v3.2.1...v3.3.3 If the full unexpurgated backtrace is required then the --backtrace and --trace options supply it as before. -* Disable loading stages configs on `cap -T` +* Disable loading stages configs on `cap -T` (@sponomarev) * Track (anonymous) statistics, see https://github.com/capistrano/stats * Enhancements (@townsen) diff --git a/features/configuration.feature b/features/configuration.feature index e04b854c..1cd70af7 100644 --- a/features/configuration.feature +++ b/features/configuration.feature @@ -19,12 +19,10 @@ Feature: The path to the configuration can be changed, removing the need to Then the task is successful And contains "install" in the output - # Feature disabled because this is not how it works, we don't load - # tasks from stage files, as we expect them to be defined in ./lib/tasks - # Scenario: Show install task with configuration in a custom location - # And config stage file has line "desc 'Special Task'" - # And config stage file has line "task :special_stage_task" - # But the configuration is in a custom location - # When I run "cap -T" - # Then the task is successful - # And contains "special_stage_task" in the output + Scenario: Hide install task with configuration in a custom location + And config stage file has line "desc 'Special Task'" + And config stage file has line "task :special_stage_task" + But the configuration is in a custom location + When I run "cap -T" + Then the task is successful + And doesn't contain "special_stage_task" in the output diff --git a/features/step_definitions/assertions.rb b/features/step_definitions/assertions.rb index 7aa1761e..3f2f472d 100644 --- a/features/step_definitions/assertions.rb +++ b/features/step_definitions/assertions.rb @@ -109,3 +109,7 @@ end Then(/contains "(.*?)" in the output/) do |expected| expect(@output).to include(expected) end + +Then(/doesn't contain "(.*?)" in the output/) do |expected| + expect(@output).not_to include(expected) +end