@robin850 what do you think about these changes?

1) `ConnectionSpecification::Resolver` expects the 2nd argument to be a Hash. So I replaced `database_configuration.to_h` with `|| {}` fallback.

2) I removed the 2nd .to_h from `spec.config`, as it always returns a Hash, so the conversion is unnecessary.