Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6.1: Add Active Record Marshal forward compatibility tests #893

Conversation

mgrunberg
Copy link
Contributor

Rails add Marshal compatibility tests (rails/rails@617f990).

This PR adds the missing dump files. It also coerce the tests to load files from a path relative to ARTest::SQLServer.test_root_sqlserver.

Files where generated by running the following spec in 6-0-stable branch:

class MarshalSerializationTest < ActiveRecord::TestCase
  fixtures :topics

  def test_deserializing_rails_6_0_marshal_basic
    File.binwrite(marshal_fixture_path("rails_6_0_topic"), Marshal.dump(Topic.find(1)))
    topic = Topic.find(1)

    topic.replies
    File.binwrite(marshal_fixture_path("rails_6_0_topic_associations"), Marshal.dump(topic))
  end

  private
    def marshal_fixture_path(file_name)
      File.expand_path(
        "support/marshal_compatibility_fixtures/#{ActiveRecord::Base.connection.adapter_name}/#{file_name}.dump",
        ARTest::SQLServer.test_root_sqlserver
      )
    end
end

@wpolicarpo wpolicarpo merged commit 35651d3 into rails-sqlserver:main Apr 20, 2021
@mgrunberg mgrunberg deleted the issues/yellowspot/rails-6-1/add-active-rRecord-marshal-forward-compatibility-tests branch January 3, 2022 17:32
lavika pushed a commit to lavika/activerecord-sqlserver-adapter that referenced this pull request Sep 26, 2023
…ls-sqlserver#893)

* add Active Record Marshal forward compatibility tests

* add changelog item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants