amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.57k stars 205 forks source link

Remove garnet spec #1306

Closed drujensen closed 1 year ago

drujensen commented 1 year ago

Description of the Change

This removes the Garnet Spec dependency that relied on selenium driver. This adds a RequestHelper set of macros that provide a harness to test controller tests. The macros create the http request methods to simplify specs.

This also enables the granite test suite which is crucial for a full set of test coverage for Amber.

Alternate Designs

Fix the garnet_spec and selenium driver.

Benefits

Although system or integration tests are valuable, the unit level tests shouldn't be dependent on this library. This separates the 2 concerns. You can still add integration tests using garnet (once its fixed) but they should be a separate set of tests and not tightly coupling the unit tests to these set of dependencies.

Possible Drawbacks

Moving the RequestHelper inside of a module instead of in its own shard may limit reuse of this functionality in other frameworks.