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

#1107 Somehow breaks my specs #1111

Closed
FunkyloverOne opened this issue Apr 22, 2019 · 4 comments · Fixed by #1112
Closed

#1107 Somehow breaks my specs #1111

FunkyloverOne opened this issue Apr 22, 2019 · 4 comments · Fixed by #1112

Comments

@FunkyloverOne
Copy link
Contributor

Subject of the issue

I'm getting the following error on perfectly normal object:

ArgumentError:
       The be_a_kind_of matcher requires that the actual object responds to either #kind_of? or #is_a? methods but it responds to neigher of two methods.

Environment

  • Ruby version: 2.5.1
  • rspec-expectations version: 3.8.3

Steps to reproduce

I do not really know yet, I will investigate more on it and provide details.

Actual behavior

value.respond_to?(:is_a?)
#=> true
::Kernel.instance_method(:respond_to?).bind(value).call(:is_a?)
#=> false

P.S an error message has a typo - neigher.

@JonRowe
Copy link
Member

JonRowe commented Apr 22, 2019

Hm. Interesting. Do you feel like patching this? We could rescue the NoMethodError instead which would circumvent the need to rely on a check

@dem
Copy link

dem commented Apr 22, 2019

The same issue for me, which not exists on rspec-expectations version: 3.8.2

@FunkyloverOne
Copy link
Contributor Author

@JonRowe sounds good to me! I will make a PR.

@p-mongo
Copy link

p-mongo commented Apr 29, 2019

#1107 also broke Mongoid test suite, it looks like the change was meant to be backwards compatible?

p-mongo pushed a commit to p-mongo/mongoid that referenced this issue Apr 29, 2019
p-mongo pushed a commit to p-mongo/mongoid that referenced this issue Apr 29, 2019
p-mongo pushed a commit to p-mongo/mongoid that referenced this issue Apr 30, 2019
p-mongo added a commit to mongodb/mongoid that referenced this issue May 1, 2019
p-mongo pushed a commit to mongodb/mongoid that referenced this issue May 23, 2019
p-mongo pushed a commit to p-mongo/mongoid that referenced this issue May 24, 2019
ms-ati pushed a commit to ms-ati/docile that referenced this issue Jun 12, 2019
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 a pull request may close this issue.

4 participants