WithCrashingApp creates an application to use with your CLI command that will not successfully start its `web` process
(f func(dir string))
| 188 | // WithCrashingApp creates an application to use with your CLI command |
| 189 | // that will not successfully start its `web` process |
| 190 | func WithCrashingApp(f func(dir string)) { |
| 191 | dir := TempDirAbsolutePath("", "crashing-ruby-app") |
| 192 | defer os.RemoveAll(dir) |
| 193 | |
| 194 | err := os.WriteFile(filepath.Join(dir, "Procfile"), []byte(`--- |
| 195 | web: bogus bogus`, |
| 196 | ), 0666) |
| 197 | Expect(err).ToNot(HaveOccurred()) |
| 198 | |
| 199 | err = os.WriteFile(filepath.Join(dir, "Gemfile"), nil, 0666) |
| 200 | Expect(err).ToNot(HaveOccurred()) |
| 201 | |
| 202 | err = os.WriteFile(filepath.Join(dir, "Gemfile.lock"), []byte(` |
| 203 | GEM |
| 204 | specs: |
| 205 | |
| 206 | PLATFORMS |
| 207 | ruby |
| 208 | |
| 209 | DEPENDENCIES |
| 210 | |
| 211 | BUNDLED WITH |
| 212 | 2.1.4 |
| 213 | `), 0666) |
| 214 | Expect(err).ToNot(HaveOccurred()) |
| 215 | |
| 216 | f(dir) |
| 217 | } |
| 218 | |
| 219 | // WithBananaPantsApp creates a simple application to use with your CLI command |
| 220 | // (typically CF Push). When pushing, be aware of specifying '-b |
no test coverage detected