Sha256: 87e14d22de9a7a6b68c6e37628bda47276a5f19ac29bd1dc2a308ad438a426c4

Contents?: true

Size: 1.59 KB

Versions: 6

Compression:

Stored size: 1.59 KB

Contents

Feature: The #mirror_rake_tasks DSL method, inside a Capistrano namespace, with an argument of a defined task

  In order to include Rake tasks with descriptions in my Capistrano recipes,
  As a developer using Cape,
  I want to use the Cape DSL.

  Scenario: mirror only the matching Rake task
    Given a full-featured Rakefile
    And a Capfile with:
      """
      namespace :ns do
        Cape do |cape|
          cape.mirror_rake_tasks 'with_period'
        end
      end
      """
    When I run `cap -T`
    Then the output should contain:
      """
      cap ns:with_period # Ends with period.
      """
    And the output should not contain "cap ns:without_period"

  Scenario: mirror Rake task 'with_period' with its description
    Given a full-featured Rakefile
    And a Capfile with:
      """
      namespace :ns do
        Cape do |cape|
          cape.mirror_rake_tasks :with_period
        end
      end
      """
    When I run `cap -e ns:with_period`
    Then the output should contain exactly:
      """
      ------------------------------------------------------------
      cap ns:with_period
      ------------------------------------------------------------
      Ends with period.


      """

  Scenario: do not mirror Rake task 'without_period'
    Given a full-featured Rakefile
    And a Capfile with:
      """
      namespace :ns do
        Cape do |cape|
          cape.mirror_rake_tasks :with_period
        end
      end
      """
    When I run `cap -e ns:without_period`
    Then the output should contain exactly:
      """
      The task `ns:without_period' does not exist.

      """

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cape-1.5.0 features/dsl/mirror_rake_tasks/inside_capistrano_namespace/with_defined_task_argument.feature
cape-1.4.0 features/dsl/mirror_rake_tasks/inside_capistrano_namespace/with_defined_task_argument.feature
cape-1.3.0 features/dsl/mirror_rake_tasks/inside_capistrano_namespace/with_defined_task_argument.feature
cape-1.2.0 features/dsl/mirror_rake_tasks/inside_capistrano_namespace/with_defined_task_argument.feature
cape-1.1.0 features/dsl/mirror_rake_tasks/inside_capistrano_namespace/with_defined_task_argument.feature
cape-1.0.3 features/dsl/mirror_rake_tasks/inside_capistrano_namespace/with_defined_task_argument.feature