This PR moves current unit tests from test/lib/godmin to test/unit. I also tried removing the wrapping Godmin module from the tests to make them flatter and simpler, but there are some weird things going on, in the resolver test in particular, so I moved on for now...
I have also looked into how to test generators. This is not perfect, but it's a start. There is something weird going on with the assertion count however, it is doubled for each test case. It doesn't seem to run the test code twice, only report it twice... They are also not super fast, but generating a blank rails app was the easiest way I could think to test them. I first considered copying the dummy app but the install generator will need a blank app anyway. Also considered generating the app with the template, but the template creates a bunch of data which we don't need.
This PR moves current unit tests from
test/lib/godmin
totest/unit
. I also tried removing the wrappingGodmin
module from the tests to make them flatter and simpler, but there are some weird things going on, in the resolver test in particular, so I moved on for now...I have also looked into how to test generators. This is not perfect, but it's a start. There is something weird going on with the assertion count however, it is doubled for each test case. It doesn't seem to run the test code twice, only report it twice... They are also not super fast, but generating a blank rails app was the easiest way I could think to test them. I first considered copying the dummy app but the install generator will need a blank app anyway. Also considered generating the app with the template, but the template creates a bunch of data which we don't need.