Giter Site home page Giter Site logo

Comments (3)

pirj avatar pirj commented on September 3, 2024 1

@JonRowe do you agree with the expected behaviour section here?

doc_string which is the first argument of example, must be string object

It confuses me when the first argument is not a string and we accept it as metadata.
It seems to be a move in the wrong direction, bending to the pressure of existing specs that pass non-strings and expect that to work.

To me, the “must” in the “must be a string object” means we raise an argument error when it’s not.

In my defense, it :pending can become just pending, even though it’s just a special case, and it :clean_db doesn’t have/deserve such an alias.

I can foresee misuse and workarounds like it “”, :clean_db do.

I find it hard to justify the it pending: “not implemented yet” do as it gives no information on what wasn’t implemented exactly. But again, this is just a special case. Another example would be it platform: :ios, but that probably should be a context.

I’d love to see more examples of what we are going to break if we go with a more strict approach.

It’s more of a gut feeling, but going with accepting the first argument as metadata where it previously wasn’t, makes me uncomfortable when thinking of side effects that might be introduced by such metadata.

from rspec-core.

pirj avatar pirj commented on September 3, 2024 1

Sounds good, and no worries. Thanks for your contributions!

from rspec-core.

eisukeyeongjo avatar eisukeyeongjo commented on September 3, 2024

@pirj
Sorry for confusing you with this issue.
And I apologize for my lack of thought.
I understand what you mentioned above.
Certainly keeping the first argument doc_sting seems a right direction.
If you do not mind, i will re-write this issue and create new pull request.

What happens to this issue may depend on Mr. @JonRowe 's reply.
But I will try to face this issue a little more.

from rspec-core.

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.