cookpad/chanko

Suggested way to test against Chanko 2.0?

dlackty opened this issue · 2 comments

Recently I started to play and adopt Chanko into our project. It works nicely and really changes the way we work.

However, I found that in Chanko 2.0, the unit generator no longer creates spec files for units, and since there's no need to run install generator in 2.0, the app/units folder is also not symlinked to /spec.

What is the suggested way to test against Chanko 2.0?

For simplicity, I removed the generator for rspec from v2.0.0.
But it seems to be necessary yet, so I'll add generator in the next version (v2.0.2) or later.
Thank you for your question 👍

I personally recommend you to put a symlink from spec/units to app/units, and then put spec files in each unit's directory (e.g. app/units/foo_unit/spec/controllers/bar_controller_spec.rb)

$ cd spec
$ ln -s ../app/units

and run specs:

$ rspec spec/units