Code Monkey home page Code Monkey logo

Comments (2)

icy-arctic-fox avatar icy-arctic-fox commented on May 28, 2024

It appears this affected the respond_to, have_attributes, be_xxx, and have_xxx matchers. Those have all been fixed. The issue was that description was the name of another argument in the parameter list, so when it got splatted, it looked like this:

FailedMatchData.new(description, "foo", description: true)

The splat operation has been removed. This will be in 0.9.25, pushing out now. You happened to catch me while I was working on Spectator. 😄

Also, I don't know if this is just from making a code snippet, but the code:

expect(A).to respond_to(:description)

will fail the test case because A#description is an instance method. So technically A won't respond to description, but anything that includes it will. To make the code pass the test, A should be:

module A
  extend self # <--- Add this

  # ...
end

from spectator.

UrsaDK avatar UrsaDK commented on May 28, 2024

Thank you so much for fixing this so quickly!

And yes, you're absolutely right about the code snippet. I made it on the fly, based on my existing code and simply forgot to include extend self. My priority was to highlight the issue. Having a passing test would have been nice, but I'm glad that a failing one demonstrated the issue just as well. :)

from spectator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.