Comments (5)
Sorry for not getting back to you about this forever—do you have require: false
in your Gemfile?
from mocktail.
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.
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.
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.
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)
- AmbiguousDemonstrationError when incorrectly using of_next vs replace and class has matching instance method HOT 3
- SyntaxError when upgrading from 1.2.0 to 1.2.1 HOT 4
- Ruby 2.7.4 Test Failure HOT 1
- Infinite loop when used on objects that define `==` HOT 2
- [Discussion] Refuting stubbed methods? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mocktail.