GithubHelp home page GithubHelp logo

Comments (5)

searls avatar searls commented on August 18, 2024

Sorry for not getting back to you about this forever—do you have require: false in your Gemfile?

from mocktail.

kevin-j-m avatar kevin-j-m commented on August 18, 2024

When I originally reported this, it was from adding to a gem as a development dependency in the gemspec. I found if I require the library, then I would avoid the NameError.

Revisiting this now, I moved it out of the gemspec and into the Gemfile, to be consistent with the README. I moved it out of the test group. I also added require: false.

In all of those scenarios, I'd see the NameError unless I require the library in the spec_helper.

Now, for caveats, this isn't a "real" gem. It's a repo I have that has some example code for a conference talk, so it may not be the best use case. It was the thing I had most easily on hand that I could link public commits to about progress on, and that's why I picked it a while ago to give this library a try.

If no one else is reporting this and aren't having issues with the README instructions using rspec, I have no issue with closing this.

from mocktail.

searls avatar searls commented on August 18, 2024

While I don't know what you might be running into, I want to make sure there's not something wrong here—mocktail has almost no usage yet because we haven't been explaining or promoting it much.

AFAICT, the library "requires itself" (a misnomer) in the sense that everything that needs to be loaded is in the conventionally-expected place (lib/mocktail.rb), so I'm a little fuzzy on what might be wrong here.

I mean, I presume if you haven't done something to require "mocktail", then of course Mocktail::DSL isn't defined. Is there something else going on here?

from mocktail.

kevin-j-m avatar kevin-j-m commented on August 18, 2024

Is the expectation that users should need to require "mocktail" before using it?

If so, do you think adding that info to the Ready to order? section of the README would be helpful? That's part of what I was asking in my (likely poorly worded) initial issue comment.

If not, I may have an issue or something funny going on with my usage.

Thanks for the follow-up! I'm looking forward to seeing this more and more in the community as a former Mockito user/fan. Great stuff here.

from mocktail.

searls avatar searls commented on August 18, 2024

Thanks Kevin. Going to close this as I don't think this indicates an issue beyond needing to make sure the library is required

from mocktail.

Related Issues (6)

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.