Failing tests expected accessible public property
Fixed issue for parent debates and sub_names.

Common failing test theme: method visibility. This has slightly changed in more modern versions of Ruby
Getter and setter methods for attributes need to have higher visibility. These should also be refactored into attr_accessors
Commented code smell of Rails test env querying, and refactored constant to Rails.env.test
Changed deprecated primary_key_name to foreign_key