Closed rawkode closed 7 years ago
Yeah I don't see why not, its not a huge lift to make it configurable. Would something like this in your config/test.exs
work?
config :cabbage,
ex_unit_module: MyAwesomeTestingFramework
And then we will just pass along anything you give to it?
The only restriction is that it must be based upon ExUnit since we override the test macro from there, frameworks based upon others would be more difficult to support (I'm not personally aware of any major competitors at the moment).
I think it may be better to pass through at the top of the module, so we can pass through ConnTest
for controller tests and ChannelTest
for channels, etc.
That makes sense to support case templates. so like this?
defmodule MyTest do
use Cabbage.Feature, use: ConnTest, feature: "my_feature.feature", other_opts: [:a, :b, :c]
end
and then we'll just do opts[:use] || ExUnit.Case
right?
Sounds good to me! If I can help in anyway, let me know 😃
Hey,
This seems pretty awesome! Instead of injecting
use ExUnit
into all generated tests, can we provide an alternative module through the keyword list?Awesome job with this :+1: