Sha256: 28c162a5a4a0cd21c44dddb76ebd8dc66aa5c1fd655287c8c8d24bc43eb14365

Contents?: true

Size: 1.47 KB

Versions: 15

Compression:

Stored size: 1.47 KB

Contents

Feature: Evaluating a Berksfile
  As a user with a Berksfile
  I want to evaluate things and see nice errors
  So I can identify my syntax errors and faults

  Scenario: Containing pure Ruby
    Given I write to "Berksfile" with:
      """
      if ENV['BACON']
        puts "If you don't got bacon..."
      else
        puts "No bacon :'("
      end
      """
    And the environment variable BACON is "1"
    When I successfully run `berks install`
    Then the output should contain:
      """
      If you don't got bacon...
      """
    And the exit status should be 0

  Scenario: Calling valid DSL methods:
    Given I write to "Berksfile" with:
      """
      site :opscode
      """
    When I successfully run `berks install`
    And the exit status should be 0

  Scenario: Containing methods I shouldn't be able to call
    Given I write to "Berksfile" with:
      """
      add_location(:foo)
      """
    When I run `berks install`
    Then the output should contain:
      """
      An error occurred while reading the Berksfile:

        undefined method `add_location' for
      """
    And the CLI should exit with the status code for error "BerksfileReadError"

  Scenario: Containing Ruby syntax errors
    Given I write to "Berksfile" with:
      """
      ptus "This is a ruby syntax error"
      """
    When I run `berks install`
    Then the output should contain:
      """
      An error occurred while reading the Berksfile:

        undefined method `ptus' for
      """

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
berkshelf-2.0.18 features/berksfile.feature
berkshelf-2.0.17 features/berksfile.feature
berkshelf-2.0.16 features/berksfile.feature
berkshelf-2.0.15 features/berksfile.feature
berkshelf-2.0.14 features/berksfile.feature
berkshelf-2.0.13 features/berksfile.feature
berkshelf-2.0.12 features/berksfile.feature
berkshelf-2.0.11 features/berksfile.feature
berkshelf-2.0.10 features/berksfile.feature
berkshelf-2.0.9 features/berksfile.feature
berkshelf-2.0.8 features/berksfile.feature
berkshelf-2.0.7 features/berksfile.feature
berkshelf-2.0.6 features/berksfile.feature
berkshelf-2.0.5 features/berksfile.feature
berkshelf-2.0.4 features/berksfile.feature