berkshelf 3.0.0.beta2 → 3.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/CHANGELOG.md +8 -0
  4. data/Gemfile +0 -1
  5. data/Guardfile +0 -4
  6. data/README.md +1 -1
  7. data/Thorfile +2 -11
  8. data/berkshelf.gemspec +2 -5
  9. data/features/berksfile.feature +2 -10
  10. data/features/commands/apply.feature +31 -0
  11. data/features/{configure_command.feature → commands/configure.feature} +9 -11
  12. data/features/{contingent_command.feature → commands/contingent.feature} +10 -20
  13. data/features/{cookbook_command.feature → commands/cookbook.feature} +4 -11
  14. data/features/{init_command.feature → commands/init.feature} +10 -19
  15. data/features/{install_command.feature → commands/install.feature} +161 -82
  16. data/features/{list_command.feature → commands/list.feature} +4 -14
  17. data/features/{outdated_command.feature → commands/outdated.feature} +21 -63
  18. data/features/{package_command.feature → commands/package.feature} +11 -22
  19. data/features/{shelf → commands/shelf}/list.feature +3 -8
  20. data/features/{shelf → commands/shelf}/show.feature +5 -9
  21. data/features/{shelf → commands/shelf}/uninstall.feature +6 -10
  22. data/features/{show_command.feature → commands/show.feature} +13 -38
  23. data/features/commands/update.feature +48 -0
  24. data/features/commands/upload.feature +197 -0
  25. data/features/commands/vendor.feature +53 -0
  26. data/features/community_site.feature +39 -0
  27. data/features/config.feature +79 -9
  28. data/features/help.feature +10 -19
  29. data/features/json_formatter.feature +19 -44
  30. data/features/licenses.feature +27 -61
  31. data/features/lockfile.feature +120 -354
  32. data/features/resolver.feature +28 -0
  33. data/features/step_definitions/berksfile_steps.rb +39 -0
  34. data/features/step_definitions/chef/config_steps.rb +1 -1
  35. data/features/step_definitions/chef_server_steps.rb +27 -27
  36. data/features/step_definitions/config_steps.rb +3 -0
  37. data/features/step_definitions/filesystem_steps.rb +10 -0
  38. data/features/step_definitions/json_steps.rb +0 -7
  39. data/features/step_definitions/lockfile_steps.rb +53 -0
  40. data/features/step_definitions/utility_steps.rb +4 -4
  41. data/features/support/env.rb +1 -0
  42. data/generator_files/Berksfile.erb +1 -1
  43. data/generator_files/README.md.erb +62 -6
  44. data/generator_files/Vagrantfile.erb +15 -4
  45. data/lib/berkshelf.rb +2 -4
  46. data/lib/berkshelf/api_client.rb +5 -7
  47. data/lib/berkshelf/berksfile.rb +24 -20
  48. data/lib/berkshelf/cached_cookbook.rb +8 -1
  49. data/lib/berkshelf/cli.rb +5 -10
  50. data/lib/berkshelf/community_rest.rb +4 -5
  51. data/lib/berkshelf/config.rb +8 -2
  52. data/lib/berkshelf/cookbook_store.rb +9 -14
  53. data/lib/berkshelf/dependency.rb +16 -13
  54. data/lib/berkshelf/errors.rb +15 -1
  55. data/lib/berkshelf/formatters/json.rb +1 -1
  56. data/lib/berkshelf/init_generator.rb +17 -3
  57. data/lib/berkshelf/installer.rb +12 -1
  58. data/lib/berkshelf/logger.rb +7 -4
  59. data/lib/berkshelf/resolver.rb +1 -1
  60. data/lib/berkshelf/version.rb +1 -1
  61. data/spec/spec_helper.rb +0 -9
  62. data/spec/support/chef_server.rb +24 -7
  63. data/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb +3 -3
  64. data/spec/unit/berkshelf/berksfile_spec.rb +35 -1
  65. data/spec/unit/berkshelf/cached_cookbook_spec.rb +8 -0
  66. data/spec/unit/berkshelf/community_rest_spec.rb +76 -25
  67. data/spec/unit/berkshelf/cookbook_generator_spec.rb +9 -3
  68. data/spec/unit/berkshelf/dependency_spec.rb +16 -1
  69. data/spec/unit/berkshelf/init_generator_spec.rb +71 -7
  70. metadata +44 -116
  71. data/.cane +0 -4
  72. data/features/apply_command.feature +0 -40
  73. data/features/groups_install.feature +0 -113
  74. data/features/update_command.feature +0 -136
  75. data/features/upload_command.feature +0 -327
  76. data/features/vendor_command.feature +0 -83
  77. data/lib/berkshelf/chef.rb +0 -7
  78. data/lib/berkshelf/chef/cookbook.rb +0 -5
  79. data/lib/berkshelf/chef/cookbook/chefignore.rb +0 -75
  80. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_download/unpacks_the_archive.json +0 -1
  81. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  82. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_cookbook.json +0 -1
  83. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_version.json +0 -1
  84. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/returns_the_cookbook_and_version_information.json +0 -1
  85. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  86. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CookbookNotFound_error_on_a_404_response.json +0 -1
  87. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/returns_the_version_number_of_the_latest_version_of_the_cookbook.json +0 -1
  88. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_satisfy/returns_the_version_number_of_the_best_solution.json +0 -1
  89. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  90. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CookbookNotFound_error_on_a_404_response.json +0 -1
  91. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/returns_an_array_containing_an_item_for_each_version.json +0 -1
  92. data/spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_dependency_as_dependencies.yml +0 -3694
  93. data/spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_source_as_sources.yml +0 -3829
  94. data/spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb +0 -19
@@ -1,16 +1,10 @@
1
- Feature: Listing cookbooks defined by a Berksfile
2
- As a user with a Berksfile
3
- I want a way to show all my cookbooks and their versions without opening my Berksfile
4
- So that I can be more productive
5
-
1
+ Feature: berks list
6
2
  Scenario: Running the list command
7
3
  Given the cookbook store has the cookbooks:
8
4
  | fake1 | 1.0.0 |
9
5
  | fake2 | 1.0.1 |
10
- Given I write to "Berksfile" with:
6
+ Given I have a Berksfile pointing at the local Berkshelf API with:
11
7
  """
12
- source "http://localhost:26210"
13
-
14
8
  cookbook 'fake1', '1.0.0'
15
9
  cookbook 'fake2', '1.0.1'
16
10
  """
@@ -21,16 +15,12 @@ Feature: Listing cookbooks defined by a Berksfile
21
15
  * fake1 (1.0.0)
22
16
  * fake2 (1.0.1)
23
17
  """
24
- And the exit status should be 0
18
+
25
19
 
26
20
  Scenario: Running the list command with no sources defined
27
- Given I write to "Berksfile" with:
28
- """
29
- source "http://localhost:26210"
30
- """
21
+ Given I have a Berksfile pointing at the local Berkshelf API
31
22
  When I successfully run `berks list`
32
23
  Then the output should contain:
33
24
  """
34
25
  There are no cookbooks installed by your Berksfile
35
26
  """
36
- And the exit status should be 0
@@ -1,8 +1,4 @@
1
- Feature: Displaying outdated cookbooks
2
- As a user
3
- I want to know what cookbooks are outdated before I run update
4
- So that I can decide whether to update everything at once
5
-
1
+ Feature: berks outdated
6
2
  Scenario: the dependency is up to date
7
3
  Given the Chef Server has cookbooks:
8
4
  | bacon | 1.0.0 |
@@ -10,58 +6,40 @@ Feature: Displaying outdated cookbooks
10
6
  And the Berkshelf API server's cache is up to date
11
7
  And the cookbook store has the cookbooks:
12
8
  | bacon | 1.1.0 |
13
- And I write to "Berksfile" with:
9
+ And I have a Berksfile pointing at the local Berkshelf API with:
14
10
  """
15
- source "http://localhost:26210"
16
-
17
11
  cookbook 'bacon', '~> 1.1.0'
18
12
  """
19
- And I write to "Berksfile.lock" with:
20
- """
21
- {
22
- "dependencies": {
23
- "bacon": {
24
- "locked_version": "1.1.0"
25
- }
26
- }
27
- }
28
- """
13
+ And the Lockfile has:
14
+ | bacon | 1.1.0 |
29
15
  When I successfully run `berks outdated`
30
16
  Then the output should contain:
31
17
  """
32
18
  All cookbooks up to date!
33
19
  """
34
20
 
35
- Scenario: the dependency has a no version constraint and there are new items
21
+
22
+ Scenario: the dependency has no version constraint and there are new items
36
23
  Given the Chef Server has cookbooks:
37
24
  | bacon | 1.0.0 |
38
25
  | bacon | 1.1.0 |
39
26
  And the Berkshelf API server's cache is up to date
40
27
  And the cookbook store has the cookbooks:
41
28
  | bacon | 1.0.0 |
42
- And I write to "Berksfile" with:
29
+ And I have a Berksfile pointing at the local Berkshelf API with:
43
30
  """
44
- source "http://localhost:26210"
45
-
46
31
  cookbook 'bacon'
47
32
  """
48
- And I write to "Berksfile.lock" with:
49
- """
50
- {
51
- "dependencies": {
52
- "bacon": {
53
- "locked_version": "1.0.0"
54
- }
55
- }
56
- }
57
- """
33
+ And the Lockfile has:
34
+ | bacon | 1.0.0 |
58
35
  When I successfully run `berks outdated`
59
36
  Then the output should contain:
60
37
  """
61
38
  The following cookbooks have newer versions:
62
- * bacon (1.1.0) [http://localhost:26210]
39
+ * bacon (1.1.0)
63
40
  """
64
41
 
42
+
65
43
  Scenario: the dependency has a version constraint and there are new items that satisfy it
66
44
  Given the Chef Server has cookbooks:
67
45
  | bacon | 1.1.0 |
@@ -70,34 +48,23 @@ Feature: Displaying outdated cookbooks
70
48
  And the Berkshelf API server's cache is up to date
71
49
  And the cookbook store has the cookbooks:
72
50
  | bacon | 1.0.0 |
73
- And I write to "Berksfile" with:
51
+ And I have a Berksfile pointing at the local Berkshelf API with:
74
52
  """
75
- source "http://localhost:26210"
76
-
77
53
  cookbook 'bacon', '~> 1.0'
78
54
  """
79
- And I write to "Berksfile.lock" with:
80
- """
81
- {
82
- "dependencies": {
83
- "bacon": {
84
- "locked_version": "1.0.0"
85
- }
86
- }
87
- }
88
- """
55
+ And the Lockfile has:
56
+ | bacon | 1.0.0 |
89
57
  When I successfully run `berks outdated`
90
58
  Then the output should contain:
91
59
  """
92
60
  The following cookbooks have newer versions:
93
- * bacon (1.5.8) [http://localhost:26210]
61
+ * bacon (1.5.8)
94
62
  """
95
63
 
64
+
96
65
  Scenario: When there is no lockfile present
97
- And I write to "Berksfile" with:
66
+ And I have a Berksfile pointing at the local Berkshelf API with:
98
67
  """
99
- source "http://localhost:26210"
100
-
101
68
  cookbook 'bacon', '1.0.0'
102
69
  """
103
70
  When I run `berks outdated`
@@ -107,23 +74,14 @@ Feature: Displaying outdated cookbooks
107
74
  """
108
75
  And the exit status should be "LockfileNotFound"
109
76
 
77
+
110
78
  Scenario: When the cookbook is not installed
111
- And I write to "Berksfile" with:
79
+ And I have a Berksfile pointing at the local Berkshelf API with:
112
80
  """
113
- source "http://localhost:26210"
114
-
115
81
  cookbook 'bacon', '1.0.0'
116
82
  """
117
- And I write to "Berksfile.lock" with:
118
- """
119
- {
120
- "dependencies": {
121
- "bacon": {
122
- "locked_version": "1.0.0"
123
- }
124
- }
125
- }
126
- """
83
+ And the Lockfile has:
84
+ | bacon | 1.0.0 |
127
85
  When I run `berks outdated`
128
86
  Then the output should contain:
129
87
  """
@@ -1,15 +1,11 @@
1
- Feature: Packaging a cookbook as a tarball for distribution
2
- As a user
3
- I want to be able to package a cookbook
4
- So that I can use it outside of Berkshelf
1
+ Feature: berks package
2
+ Background:
3
+ * the cookbook store has the cookbooks:
4
+ | fake | 1.0.0 |
5
5
 
6
6
  Scenario: When no options are passed
7
- Given the cookbook store has the cookbooks:
8
- | fake | 1.0.0 |
9
- And I write to "Berksfile" with:
7
+ Given I have a Berksfile pointing at the local Berkshelf API with:
10
8
  """
11
- source "http://localhost:26210"
12
-
13
9
  cookbook 'fake', '~> 1.0.0'
14
10
  """
15
11
  When I successfully run `berks package fake`
@@ -19,25 +15,19 @@ Feature: Packaging a cookbook as a tarball for distribution
19
15
  Cookbook(s) packaged to
20
16
  """
21
17
 
18
+
22
19
  Scenario: With the --output option
23
- Given the cookbook store has the cookbooks:
24
- | fake | 1.0.0 |
25
- And I write to "Berksfile" with:
20
+ Given I have a Berksfile pointing at the local Berkshelf API with:
26
21
  """
27
- source "http://localhost:26210"
28
-
29
22
  cookbook 'fake', '~> 1.0.0'
30
23
  """
31
24
  When I successfully run `berks package fake --output foo/bar`
32
25
  Then a file named "foo/bar/fake.tar.gz" should exist
33
26
 
27
+
34
28
  Scenario: With an installed cookbook name
35
- Given the cookbook store has the cookbooks:
36
- | fake | 1.0.0 |
37
- And I write to "Berksfile" with:
29
+ Given I have a Berksfile pointing at the local Berkshelf API with:
38
30
  """
39
- source "http://localhost:26210"
40
-
41
31
  cookbook 'fake', '~> 1.0.0'
42
32
  """
43
33
  When I run `berks package non-existent`
@@ -48,12 +38,11 @@ Feature: Packaging a cookbook as a tarball for distribution
48
38
  """
49
39
  And the exit status should be "CookbookNotFound"
50
40
 
41
+
51
42
  Scenario: With an invalid cookbook
52
43
  Given a cookbook named "cookbook with spaces"
53
- And I write to "Berksfile" with:
44
+ And I have a Berksfile pointing at the local Berkshelf API with:
54
45
  """
55
- source "http://localhost:26210"
56
-
57
46
  cookbook 'cookbook with spaces', path: './cookbook with spaces'
58
47
  """
59
48
  When I run `berks package`
@@ -1,15 +1,11 @@
1
- Feature: Listing all cookbooks in the Berkshelf shelf
2
- As a user with a cookbook store
3
- I want to show all the cookbooks I have installed
4
- So that I can be well informed
5
-
1
+ Feature: berks shelf list
6
2
  Scenario: With no cookbooks in the store
7
3
  When I successfully run `berks shelf list`
8
4
  Then the output should contain:
9
5
  """
10
6
  There are no cookbooks in the Berkshelf shelf
11
7
  """
12
- And the exit status should be 0
8
+
13
9
 
14
10
  Scenario: With two cookbooks in the store
15
11
  Given the cookbook store has the cookbooks:
@@ -22,7 +18,7 @@ Feature: Listing all cookbooks in the Berkshelf shelf
22
18
  * ekaf (2.3.4)
23
19
  * fake (1.0.0)
24
20
  """
25
- And the exit status should be 0
21
+
26
22
 
27
23
  Scenario: With multiple cookbook versions installed
28
24
  Given the cookbook store has the cookbooks:
@@ -36,4 +32,3 @@ Feature: Listing all cookbooks in the Berkshelf shelf
36
32
  Cookbooks in the Berkshelf shelf:
37
33
  * fake (1.0.0, 1.1.0, 1.2.0, 2.0.0)
38
34
  """
39
- And the exit status should be 0
@@ -1,8 +1,4 @@
1
- Feature: Displaying information about a cookbook in the Berkshelf shelf
2
- As a user with a cookbook store
3
- I want to show information about a specific cookbook in my cookbook store
4
- So that I can be well informed
5
-
1
+ Feature: berks shelf show
6
2
  Scenario: With a cookbook that is not in the store
7
3
  When I run `berks shelf show fake`
8
4
  Then the output should contain:
@@ -11,6 +7,7 @@ Feature: Displaying information about a cookbook in the Berkshelf shelf
11
7
  """
12
8
  And the exit status should be "CookbookNotFound"
13
9
 
10
+
14
11
  Scenario: With cookbooks in the store
15
12
  Given the cookbook store has the cookbooks:
16
13
  | fake | 1.0.0 |
@@ -30,7 +27,6 @@ Feature: Displaying information about a cookbook in the Berkshelf shelf
30
27
  """
31
28
  Name: ekaf
32
29
  """
33
- And the exit status should be 0
34
30
 
35
31
 
36
32
  Scenario: With cookbooks in the store and the --version option
@@ -52,7 +48,7 @@ Feature: Displaying information about a cookbook in the Berkshelf shelf
52
48
  """
53
49
  Name: ekaf
54
50
  """
55
- And the exit status should be 0
51
+
56
52
 
57
53
  Scenario: With cookbooks in the store and the --version option doesn't exist
58
54
  Given the cookbook store has the cookbooks:
@@ -65,6 +61,7 @@ Feature: Displaying information about a cookbook in the Berkshelf shelf
65
61
  """
66
62
  And the exit status should be "CookbookNotFound"
67
63
 
64
+
68
65
  Scenario: With multiple cookbook versions installed
69
66
  Given the cookbook store has the cookbooks:
70
67
  | fake | 1.0.0 |
@@ -103,7 +100,7 @@ Feature: Displaying information about a cookbook in the Berkshelf shelf
103
100
  Email: YOUR_EMAIL
104
101
  License: none
105
102
  """
106
- And the exit status should be 0
103
+
107
104
 
108
105
  Scenario: With multiple cookbook versions installed and the --version flag
109
106
  Given the cookbook store has the cookbooks:
@@ -149,4 +146,3 @@ Feature: Displaying information about a cookbook in the Berkshelf shelf
149
146
  Email: YOUR_EMAIL
150
147
  License: none
151
148
  """
152
- And the exit status should be 0
@@ -1,8 +1,4 @@
1
- Feature: Removing a cookbook from the Berkshelf shelf
2
- As a user with a cookbook store
3
- I want to remove a cookbook because it's a bad version
4
- So that I don't have to manually touch things in the ~/.berkshelf directory
5
-
1
+ Feature: berks shelf uninstall
6
2
  Scenario: With no cookbooks in the store
7
3
  When I run `berks shelf uninstall fake`
8
4
  Then the output should contain:
@@ -11,6 +7,7 @@ Feature: Removing a cookbook from the Berkshelf shelf
11
7
  """
12
8
  And the exit status should be "CookbookNotFound"
13
9
 
10
+
14
11
  Scenario: With two cookbooks in the store
15
12
  Given the cookbook store has the cookbooks:
16
13
  | fake | 1.0.0 |
@@ -24,7 +21,7 @@ Feature: Removing a cookbook from the Berkshelf shelf
24
21
  | fake | 1.0.0 |
25
22
  And the cookbook store should have the cookbooks:
26
23
  | ekaf | 2.3.4 |
27
- And the exit status should be 0
24
+
28
25
 
29
26
  Scenario: With multiple cookbook versions installed
30
27
  Given the cookbook store has the cookbooks:
@@ -45,7 +42,7 @@ Feature: Removing a cookbook from the Berkshelf shelf
45
42
  | fake | 1.1.0 |
46
43
  | fake | 1.2.0 |
47
44
  | fake | 2.0.0 |
48
- And the exit status should be 0
45
+
49
46
 
50
47
  Scenario: When specifying a version
51
48
  Given the cookbook store has the cookbooks:
@@ -64,7 +61,7 @@ Feature: Removing a cookbook from the Berkshelf shelf
64
61
  | fake | 1.1.0 |
65
62
  | fake | 1.2.0 |
66
63
  | fake | 2.0.0 |
67
- And the exit status should be 0
64
+
68
65
 
69
66
  @spawn
70
67
  Scenario: With contingencies
@@ -86,7 +83,7 @@ Feature: Removing a cookbook from the Berkshelf shelf
86
83
  """
87
84
  And the cookbook store should not have the cookbooks:
88
85
  | ekaf | 2.3.4 |
89
- And the exit status should be 0
86
+
90
87
 
91
88
  Scenario: With contingencies and the --force flag
92
89
  Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
@@ -100,4 +97,3 @@ Feature: Removing a cookbook from the Berkshelf shelf
100
97
  """
101
98
  And the cookbook store should not have the cookbooks:
102
99
  | ekaf | 2.3.4 |
103
- And the exit status should be 0
@@ -1,27 +1,13 @@
1
- Feature: Displaying information about a cookbook defined by a Berksfile
2
- As a user
3
- I want to be able to view the metadata information of a cached cookbook
4
- So that I can troubleshoot bugs or satisfy my own curiosity
5
-
1
+ Feature: berks show
6
2
  Scenario: With no options
7
3
  Given the cookbook store has the cookbooks:
8
4
  | fake | 1.0.0 |
9
- And I write to "Berksfile" with:
5
+ And I have a Berksfile pointing at the local Berkshelf API with:
10
6
  """
11
- source "http://localhost:26210"
12
-
13
7
  cookbook 'fake', '1.0.0'
14
8
  """
15
- And I write to "Berksfile.lock" with:
16
- """
17
- {
18
- "dependencies": {
19
- "fake": {
20
- "locked_version": "1.0.0"
21
- }
22
- }
23
- }
24
- """
9
+ And the Lockfile has:
10
+ | fake | 1.0.0 |
25
11
  When I successfully run `berks show fake`
26
12
  Then the output should contain:
27
13
  """
@@ -33,11 +19,9 @@ Feature: Displaying information about a cookbook defined by a Berksfile
33
19
  License: none
34
20
  """
35
21
 
22
+
36
23
  Scenario: When the cookbook is not in the Berksfile
37
- Given I write to "Berksfile" with:
38
- """
39
- source "http://localhost:26210"
40
- """
24
+ Given I have a Berksfile pointing at the local Berkshelf API
41
25
  When I run `berks show fake`
42
26
  Then the output should contain:
43
27
  """
@@ -45,11 +29,10 @@ Feature: Displaying information about a cookbook defined by a Berksfile
45
29
  """
46
30
  And the exit status should be "DependencyNotFound"
47
31
 
32
+
48
33
  Scenario: When there is no lockfile present
49
- And I write to "Berksfile" with:
34
+ And I have a Berksfile pointing at the local Berkshelf API with:
50
35
  """
51
- source "http://localhost:26210"
52
-
53
36
  cookbook 'fake', '1.0.0'
54
37
  """
55
38
  When I run `berks show fake`
@@ -59,23 +42,15 @@ Feature: Displaying information about a cookbook defined by a Berksfile
59
42
  """
60
43
  And the exit status should be "LockfileNotFound"
61
44
 
45
+
62
46
  Scenario: When the cookbook is not installed
63
- And I write to "Berksfile" with:
47
+ Given the cookbook store is empty
48
+ And I have a Berksfile pointing at the local Berkshelf API with:
64
49
  """
65
- source "http://localhost:26210"
66
-
67
50
  cookbook 'fake', '1.0.0'
68
51
  """
69
- And I write to "Berksfile.lock" with:
70
- """
71
- {
72
- "dependencies": {
73
- "fake": {
74
- "locked_version": "1.0.0"
75
- }
76
- }
77
- }
78
- """
52
+ And the Lockfile has:
53
+ | fake | 1.0.0 |
79
54
  When I run `berks show fake`
80
55
  Then the output should contain:
81
56
  """