Sha256: 5e3268f49b6786e00add2da9f9d115386c16e0207220023b5bb298d510efde16

Contents?: true

Size: 1.78 KB

Versions: 11

Compression:

Stored size: 1.78 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

11 entries across 11 versions & 1 rubygems

Version Path
berkshelf-1.0.0.rc1 features/groups_install.feature
berkshelf-0.6.0.beta4 features/groups_install.feature
berkshelf-0.6.0.beta3 features/groups_install.feature
berkshelf-0.6.0.beta2 features/groups_install.feature
berkshelf-0.5.1 features/groups_install.feature
berkshelf-0.6.0.beta1 features/groups_install.feature
berkshelf-0.5.0 features/groups_install.feature
berkshelf-0.5.0.rc4 features/groups_install.feature
berkshelf-0.5.0.rc3 features/groups_install.feature
berkshelf-0.5.0.rc2 features/groups_install.feature
berkshelf-0.5.0.rc1 features/groups_install.feature