Skip to content

Instantly share code, notes, and snippets.

@edk
Created May 24, 2023 05:38
Show Gist options
  • Save edk/740502eaee94d720271662872267bdb0 to your computer and use it in GitHub Desktop.
Save edk/740502eaee94d720271662872267bdb0 to your computer and use it in GitHub Desktop.

Without monkeypatch:

$ rails test
[...]
ERROR Jumpstart::AccountInvitationsTest#test_can_accept_invitation (1.38s)
Minitest::UnexpectedError:         NoMethodError: undefined method `tagged' for nil:NilClass
            app/models/account_invitation.rb:57:in `block in accept!'
            app/models/account_invitation.rb:56:in `each'
            app/models/account_invitation.rb:56:in `accept!'
            app/controllers/account_invitations_controller.rb:11:in `update'
            test/integration/account_invitations_test.rb:34:in `block (3 levels) in <class:AccountInvitationsTest>'
            test/integration/account_invitations_test.rb:33:in `block (2 levels) in <class:AccountInvitationsTest>'
            test/integration/account_invitations_test.rb:32:in `block in <class:AccountInvitationsTest>'

ERROR Jumpstart::AccountInvitationsTest#test_does_accept_invitation_automatically_through_sign_up (1.40s)
Minitest::UnexpectedError:         NoMethodError: undefined method `tagged' for nil:NilClass
            app/models/account_invitation.rb:57:in `block in accept!'
            app/models/account_invitation.rb:56:in `each'
            app/models/account_invitation.rb:56:in `accept!'
            app/controllers/users/registrations_controller.rb:45:in `sign_up'
            test/integration/account_invitations_test.rb:52:in `block (2 levels) in <class:AccountInvitationsTest>'
            test/integration/account_invitations_test.rb:51:in `block in <class:AccountInvitationsTest>'

ERROR AccountInvitationTest#test_accept (1.65s)
Minitest::UnexpectedError:         NoMethodError: undefined method `tagged' for nil:NilClass
            app/models/account_invitation.rb:57:in `block in accept!'
            app/models/account_invitation.rb:56:in `each'
            app/models/account_invitation.rb:56:in `accept!'
            test/models/account_invitation_test.rb:42:in `block (2 levels) in <class:AccountInvitationTest>'
            test/models/account_invitation_test.rb:41:in `block in <class:AccountInvitationTest>'

ERROR AccountInvitationTest#test_accept_sends_notifications_account_owner_and_inviter (1.67s)
Minitest::UnexpectedError:         NoMethodError: undefined method `tagged' for nil:NilClass
            app/models/account_invitation.rb:57:in `block in accept!'
            app/models/account_invitation.rb:56:in `each'
            app/models/account_invitation.rb:56:in `accept!'
            test/models/account_invitation_test.rb:60:in `block (2 levels) in <class:AccountInvitationTest>'
            test/models/account_invitation_test.rb:59:in `block in <class:AccountInvitationTest>'

ERROR NotificationTest#test_notifications_with_user_param_are_destroyed_when_user_destroyed (2.12s)
Minitest::UnexpectedError:         NoMethodError: undefined method `tagged' for nil:NilClass
            test/models/notification_test.rb:30:in `block in <class:NotificationTest>'

ERROR NotificationTest#test_notifications_with_account_are_destroyed_when_account_destroyed (2.13s)
Minitest::UnexpectedError:         NoMethodError: undefined method `tagged' for nil:NilClass
            test/models/notification_test.rb:39:in `block in <class:NotificationTest>'

 FAIL AccountTest#test_transfer_ownership_to_a_new_owner (2.25s)
        Expected false to be truthy.
        test/models/account_test.rb:140:in `block in <class:AccountTest>'

  379/379: [=================================================================================================] 100% Time: 00:00:02, Time: 00:00:02

Finished in 2.86779s
379 tests, 572 assertions, 1 failures, 6 errors, 0 skips

With monkeypatch:

PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from /Users/edk/.rvm/gems/ruby-3.2.2/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:980:in `new'
  379/379: [=================================================================================================] 100% Time: 00:00:02, Time: 00:00:02

Finished in 2.76714s
379 tests, 591 assertions, 0 failures, 0 errors, 0 skips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment