features/install_command.feature in berkshelf-3.0.0.beta1 vs features/install_command.feature in berkshelf-3.0.0.beta2

- old
+ new

@@ -16,11 +16,11 @@ cookbook 'berkshelf' """ And the Chef Server has cookbooks: | berkshelf | 1.0.0 | | berkshelf | 2.0.0 | - And the Berkshelf API server cache is up to date + And the Berkshelf API server's cache is up to date When I successfully run `berks install` Then the output should contain: """ Installing berkshelf (2.0.0) """ @@ -35,11 +35,11 @@ cookbook 'berkshelf', '1.0.0' """ And the Chef Server has cookbooks: | berkshelf | 1.0.0 | | berkshelf | 2.0.0 | - And the Berkshelf API server cache is up to date + And the Berkshelf API server's cache is up to date When I successfully run `berks install` Then the output should contain: """ Installing berkshelf (1.0.0) """ @@ -60,11 +60,11 @@ end """ And the Chef Server has cookbooks: | ruby | 1.0.0 | | elixir | 1.0.0 | - And the Berkshelf API server cache is up to date + And the Berkshelf API server's cache is up to date When I successfully run `berks install` Then the output should contain: """ Installing ruby (1.0.0) Installing elixir (1.0.0) @@ -82,11 +82,11 @@ """ And the cookbook store contains a cookbook "berkshelf" "1.0.0" with dependencies: | hostsfile | = 1.0.1 | And the cookbook store has the cookbooks: | hostsfile | 1.0.1 | - And the Berkshelf API server cache is up to date + And the Berkshelf API server's cache is up to date When I successfully run `berks install` Then the output should contain: """ Using hostsfile (1.0.1) """ @@ -94,13 +94,13 @@ Scenario: installing a demand from a path location Given I write to "Berksfile" with: """ source "http://localhost:26210" - cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0' + cookbook 'example_cookbook', path: '../../fixtures/cookbooks/example_cookbook-0.5.0' """ - And the Berkshelf API server cache is up to date + And the Berkshelf API server's cache is up to date When I successfully run `berks install` Then the output should contain: """ Using example_cookbook (0.5.0) path: ' """ @@ -108,11 +108,11 @@ Scenario: installing a Berksfile from a remote directory that contains a path location Given I write to "tmp_berks/Berksfile" with: """ source "http://localhost:26210" - cookbook 'example_cookbook', path: '../../../spec/fixtures/cookbooks/example_cookbook-0.5.0' + cookbook 'example_cookbook', path: '../../../fixtures/cookbooks/example_cookbook-0.5.0' """ When I successfully run `berks install -b ./tmp_berks/Berksfile` Then the output should contain: """ Using example_cookbook (0.5.0) path: ' @@ -264,14 +264,42 @@ Then the output should contain: """ Using fake (0.0.0) """ + Scenario: running install when a Berksfile.lock is present + Given the Chef Server has cookbooks: + | bacon | 0.1.0 | + | bacon | 0.2.0 | + | bacon | 1.0.0 | + And the Berkshelf API server's cache is up to date + And I write to "Berksfile" with: + """ + source "http://localhost:26210" + + cookbook 'bacon', '~> 0.1' + """ + And I write to "Berksfile.lock" with: + """ + { + "dependencies": { + "bacon": { + "locked_version": "0.2.0" + } + } + } + """ + When I successfully run `berks install` + Then the output should contain: + """ + Installing bacon (0.2.0) + """ + Scenario: running install with no Berksfile or Berksfile.lock When I run `berks install` Then the output should contain: """ - No Berksfile or Berksfile.lock found at: + No Berksfile or Berksfile.lock found at ' """ And the exit status should be "BerksfileNotFound" Scenario: running install when the Cookbook is not found on the remote site Given I write to "Berksfile" with: