Sha256: 00d3efbef73ea6e6282f3e55052b9493eb6a66e8657215ff4c8cc1877c3b23b2

Contents?: true

Size: 1.76 KB

Versions: 26

Compression:

Stored size: 1.76 KB

Contents

Feature: installing groups
  As a user
  I want to be able specify groups of cookbooks to include or exclude
  So I don't install cookbooks that are part of a group that I do not want to install

  Scenario: except groups
    Given I write to "Berksfile" with:
      """
      group :notme do
        cookbook "nginx", "= 0.101.2"
      end

      cookbook "artifact", "= 0.10.0"

      group :takeme do
        cookbook "ntp", "= 1.1.8"
      end
      """
    When I run the install command with flags:
      | --except notme |
    Then the cookbook store should have the cookbooks:
      | artifact | 0.10.0 |
      | ntp      | 1.1.8 |
    And the cookbook store should not have the cookbooks:
      | nginx | 0.101.2 |

  Scenario: only groups
    Given I write to "Berksfile" with:
      """
      group :notme do
        cookbook "nginx", "= 0.101.2"
      end

      cookbook "artifact", "= 0.10.0"

      group :takeme do
        cookbook "ntp", "= 1.1.8"
      end
      """
    When I run the install command with flags:
      | --only takeme |
    Then the cookbook store should have the cookbooks:
      | ntp | 1.1.8 |
    And the cookbook store should not have the cookbooks:
      | nginx    | 0.101.2 |
      | artifact | 0.10.0 |

  Scenario: attempting to provide an only and except option
    Given I write to "Berksfile" with:
      """
      group :notme do
        cookbook "nginx", "= 0.101.2"
      end

      cookbook "artifact", "= 0.10.0"

      group :takeme do
        cookbook "ntp", "= 1.1.8"
      end
      """
    When I run the install command with flags:
      | --only takeme --except notme |
    Then the output should contain:
      """
      Cannot specify both :except and :only
      """
    And the CLI should exit with the status code for error "ArgumentError"

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
berkshelf-1.4.6 features/groups_install.feature
berkshelf-1.4.5 features/groups_install.feature
berkshelf-1.4.4 features/groups_install.feature
berkshelf-1.4.3 features/groups_install.feature
berkshelf-1.4.2 features/groups_install.feature
berkshelf-1.4.1 features/groups_install.feature
berkshelf-1.4.0 features/groups_install.feature
berkshelf-1.4.0.rc1 features/groups_install.feature
berkshelf-1.3.1 features/groups_install.feature
berkshelf-1.3.0.rc1 features/groups_install.feature
berkshelf-1.2.1 features/groups_install.feature
berkshelf-1.2.0.rc1 features/groups_install.feature
berkshelf-1.1.6 features/groups_install.feature
berkshelf-1.1.5 features/groups_install.feature
berkshelf-1.1.4 features/groups_install.feature
berkshelf-1.1.3 features/groups_install.feature
berkshelf-1.1.2 features/groups_install.feature
berkshelf-1.1.1 features/groups_install.feature
berkshelf-1.1.0 features/groups_install.feature
berkshelf-1.1.0.rc1 features/groups_install.feature