11package gems_test
22
33import (
4+ "github.com/cloudfoundry/libcfbuildpack/buildpackplan"
45 "path/filepath"
56 "testing"
67
7- "github.com/buildpack/libbuildpack/buildplan"
88 "github.com/cloudfoundry/bundler-cnb/gems"
99 "github.com/cloudfoundry/libcfbuildpack/test"
1010 "github.com/golang/mock/gomock"
@@ -41,7 +41,9 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
4141
4242 when ("there is no Gemfile.lock" , func () {
4343 it ("fails" , func () {
44- factory .AddBuildPlan (gems .Dependency , buildplan.Dependency {})
44+ factory .AddPlan (buildpackplan.Plan {
45+ Name : gems .Dependency ,
46+ })
4547
4648 _ , _ , err := gems .NewContributor (factory .Build , mockPkgManager )
4749 Expect (err ).To (HaveOccurred ())
@@ -58,7 +60,9 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
5860 })
5961
6062 it ("returns true if a build plan exists" , func () {
61- factory .AddBuildPlan (gems .Dependency , buildplan.Dependency {})
63+ factory .AddPlan (buildpackplan.Plan {
64+ Name : gems .Dependency ,
65+ })
6266
6367 _ , willContribute , err := gems .NewContributor (factory .Build , mockPkgManager )
6468 Expect (err ).NotTo (HaveOccurred ())
@@ -72,7 +76,9 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
7276 })
7377
7478 it ("uses Gemfile for identity" , func () {
75- factory .AddBuildPlan (gems .Dependency , buildplan.Dependency {})
79+ factory .AddPlan (buildpackplan.Plan {
80+ Name : gems .Dependency ,
81+ })
7682
7783 contributor , _ , _ := gems .NewContributor (factory .Build , mockPkgManager )
7884 name , version := contributor .Metadata .Identity ()
@@ -92,7 +98,7 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
9298 // })
9399 //
94100 // it("contributes gems to the cache layer when included in the build plan", func() {
95- // factory.AddBuildPlan (gems.Dependency, buildplan.Dependency{
101+ // factory.AddPlan (gems.Dependency, buildplan.Dependency{
96102 // Metadata: buildplan.Metadata{"build": true},
97103 // })
98104 //
@@ -110,7 +116,7 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
110116 // })
111117 //
112118 // it("contributes gems to the launch layer when included in the build plan", func() {
113- // factory.AddBuildPlan (gems.Dependency, buildplan.Dependency{
119+ // factory.AddPlan (gems.Dependency, buildplan.Dependency{
114120 // Metadata: buildplan.Metadata{"launch": true},
115121 // })
116122 //
@@ -133,7 +139,7 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
133139 //when("the app is not vendored", func() {
134140 //
135141 // it("contributes gems to the cache layer when included in the build plan", func() {
136- // factory.AddBuildPlan (gems.Dependency, buildplan.Dependency{
142+ // factory.AddPlan (gems.Dependency, buildplan.Dependency{
137143 // Metadata: buildplan.Metadata{"build": true},
138144 // })
139145 //
@@ -181,7 +187,7 @@ func testGems(t *testing.T, when spec.G, it spec.S) {
181187 // })
182188 //
183189 // it("contributes gems to the launch layer when included in the build plan", func() {
184- // factory.AddBuildPlan (gems.Dependency, buildplan.Dependency{
190+ // factory.AddPlan (gems.Dependency, buildplan.Dependency{
185191 // Metadata: buildplan.Metadata{"launch": true},
186192 // })
187193 //
0 commit comments