Skip to content

Gem breaks with rails 7.1 #24

@skatkov

Description

@skatkov

Description

This gem breaks for rails HEAD version (e.g. 7.1), instead of usual hash structure, we're getting string representation of a hash structure.

Issue was discovered in this PR #19

Steps

  • Uncomment testing against "rails_head"
  • Run appraisal install
  • Run appraisal rake

Result

Following errors are returned for tests that run against rails head.

Error:
PbbuilderTemplateTest#test_nested_message_partial:
NoMethodError: undefined method `best_friend' for "<API::Person: name: \"Chris Harris\", friends: [], best_friend: <API::Person: name: \"Max Verstappen\", friends: [], nicknames: [], favourite_foods: {}>, nicknames: [], favourite_foods: {}>":String

    assert_equal "Max Verstappen", result.best_friend.name
                                         ^^^^^^^^^^^^
    /Users/skatkov/Code/pbbuilder/test/pbbuilder_template_test.rb:77:in `block in <class:PbbuilderTemplateTest>'
Error:
PbbuilderTemplateTest#test_basic_template:
NoMethodError: undefined method `name' for "<API::Person: name: \"hello\", friends: [], nicknames: [], favourite_foods: {}>":String

    assert_equal "hello", result.name
                                ^^^^^
    /Users/skatkov/Code/pbbuilder/test/pbbuilder_template_test.rb:26:in `block in <class:PbbuilderTemplateTest>'

Expected result

Instead of a hash structure returned as it was before, now string representation of hash is being returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions