Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for types assignable to special step argument typ…
…es (#28) This update adds support for injecting special step arguments whose types are assignable to the 4 supported types (in contrast to supporting only arguments whose types are precisely those 4). ### Background use case: Terratest I wanted to use gocuke with [Terratest](https://github.com/gruntwork-io/terratest). Injecting a `gocuke.TestingT` into my suite didn't provide the `Name()` method required by Terratest: `./gocuke_test.go:51:25: cannot use s (variable of type *suite) as "github.com/gruntwork-io/terratest/modules/testing".TestingT value in argument to terraform.InitAndApply: *suite does not implement "github.com/gruntwork-io/terratest/modules/testing".TestingT (missing method Name)` I added `Name()` to a custom interface that includes all the methods in `gocuke.TestingT`. But this was not injected via the special step arguments. My solution was to modify this behavior in `runner.go` to inject based on assignability instead of equality.
- Loading branch information