eridem/patata

Alternate file structure

Closed this issue · 1 comments

I purpose that patata support searching in the same level as features and config for a folder called definition so optional you can separate definitions into their own folder if you so choose.

You are right. But this is something you can do right now. Patata reads everything inside the features folder. On there, you can decide how you structure your filesystem.

The only thing that Patata checks is the suffixes: *.ios.feature, *.android.feature and *.common.feature.

I do not see the need to hardcode a query folder for definitions due the final user can decide.

In another hand, I propose few alternatives:

a) we can decide to improve the scaffolding command patata feature [name] asking which structure you would like to set up. E.g:

patata feature my-feature [--definition-split]
patata feature my-feature [--domain-split] (default)

b) The default split mode can be set up on the Patata settings patata.yml. E.g.

SplitMode: definition|domain

c) On create the project patata init [name], it can ask you which mode you wish and save it on the patata.yml file as said on (b).

Depending on the option, the file system can be distributed according.

NOTES:

  • The domain based split is the current one. I saw easier to isolate every feature and implementation by folder.
  • The definition based split separates the descriptions from the implementation as you suggest.