On GitHub (and probably other services as well), the standard practice is to include a CONTRIBUTING file in the root directory of the project, with information that contributors needs. GitHub even gives potential contributors easy access to the contents of this file when creating issues or pull requests. Prior to undertaking an effort with the intent of contributing, the right thing to do would be to read the CONTRIBUTING file or reach out to the project owners. This will help you determine what you need to do to have them accept your contribution.
If, based on what you learn, the contributor will accept pull requests, then great. You can make your changes and submit a pull request. As long as you follow the guidelines, it should be accepted. But what happens when the project isn't accepting pull requests? Or, for some reason your pull request isn't accepted? You still have options.
First, you could create a patch file. Git supports this. You can somehow distribute the patch file. Perhaps create an issue on the project and attach the patch. If it's extremely popular, than maybe the creator will reconsider. It may be closed, though, but if you provide enough details, people searching for the same thing may find your issue and the patch and be able to apply it themselves.
Something to note about a patch - I'd recommend keeping it small. For example, you mentioned that you had improved existing tests. In a patch, I'd focus on the changes to implement your feature and the new or modified tests to confirm the functionality of your feature.
If this isn't good enough, you can consider forking the project. You can point back to the original project in your README. You don't necessary need to keep it in sync with the original project, but it may be beneficial. It would allow you (and perhaps others, if the author is accepting no pull requests) to be able to submit changes. Even if you don't keep your project up-to-date with changes in the original project, your contribution may help someone out there.
Again, if you did fork, you could add an issue as an enhancement request to the original project, pointing to your project. It may let the owners of the other project see if your enhancement is popular and reconsider pulling it in or may help people who find the main project and the issue and get something that will help them out.