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