Not a valid test because GitHub permalink rewriting is disabled entirely on this Discourse instance. (I wonder what that says about this feature if it is disabled on the “official” instance
)
If you were to write this example as a test case for replace_github_non_permalinks.rb / replace_github_non_permalinks_spec.rb instead, then I think you would find that link also gets rewritten.