Skip to content

instance_of? not functioning correctly on second run #33

Open
@mattbeedle

Description

@mattbeedle

The first time around all of my tests pass. The second time around I have failures related to ActiveRecord equality comparisons.

This fails for example

User.deactivated.should include(user)

Taking a closer look:

user.class # => User(id: integer, email: string, encrypted_password: string, .........)

user.instance_of?(user.class) # => true 

User.deactivated.first.class # => User(id: integer, email: string, encrypted_password: string, .........)

User.deactivated.instance_of(user.class) # => false

u = User.new
u.instance_of?(user.class) # => false
u.instance_of?(User.deactivated.class) # => true

I think this issue may be related to #31

/cc @nilbus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions