DRY up spec tests for nim package provider