use Specta syntax
fix crash when trying to open a non-existing repository with spaces

* refactor tests
* fix typo (desc instead of reason)
* fix putting nil in dictionary