88
99 "io/ioutil"
1010
11- "github.com/cloudfoundry /packit"
11+ "github.com/paketo-buildpacks /packit"
1212 "github.com/paketo-community/bundle-install/bundle"
1313 "github.com/paketo-community/bundle-install/bundle/fakes"
1414 "github.com/sclevine/spec"
@@ -52,43 +52,22 @@ func testDetect(t *testing.T, context spec.G, it spec.S) {
5252 {Name : "gems" },
5353 },
5454 Requires : []packit.BuildPlanRequirement {
55- {
56- Name : "gems" ,
57- Metadata : bundle.BuildPlanMetadata {
58- Launch : true ,
59- },
60- },
6155 {
6256 Name : "bundler" ,
6357 Metadata : bundle.BuildPlanMetadata {
64- Build : true ,
65- Launch : true ,
58+ Build : true ,
6659 },
6760 },
6861 {
6962 Name : "mri" ,
7063 Metadata : bundle.BuildPlanMetadata {
71- Build : true ,
72- Launch : true ,
64+ Build : true ,
7365 },
7466 },
7567 },
7668 }))
7769 })
7870
79- context ("when the Gemfile file does not exist" , func () {
80- it .Before (func () {
81- Expect (os .Remove (filepath .Join (workingDir , "Gemfile" ))).To (Succeed ())
82- })
83-
84- it ("fails detection" , func () {
85- _ , err := detect (packit.DetectContext {
86- WorkingDir : workingDir ,
87- })
88- Expect (err ).To (MatchError (packit .Fail ))
89- })
90- })
91-
9271 context ("when the Gemfile specifies an mri ruby version" , func () {
9372 it .Before (func () {
9473 gemfileParser .ParseVersionCall .Returns .Version = "2.6.x"
@@ -104,25 +83,17 @@ func testDetect(t *testing.T, context spec.G, it spec.S) {
10483 {Name : "gems" },
10584 },
10685 Requires : []packit.BuildPlanRequirement {
107- {
108- Name : "gems" ,
109- Metadata : bundle.BuildPlanMetadata {
110- Launch : true ,
111- },
112- },
11386 {
11487 Name : "bundler" ,
11588 Metadata : bundle.BuildPlanMetadata {
116- Build : true ,
117- Launch : true ,
89+ Build : true ,
11890 },
11991 },
12092 {
12193 Name : "mri" ,
12294 Version : "2.6.x" ,
12395 Metadata : bundle.BuildPlanMetadata {
124- Build : true ,
125- Launch : true ,
96+ Build : true ,
12697 },
12798 },
12899 },
0 commit comments