[rspec-users] Cucumber ".should contain(expected) does but fails anyway
lists at ruby-forum.com
Thu Apr 23 14:56:49 EDT 2009
David Chelimsky wrote:
> I don't think we should call it metaclass though, but I'm not sure
> what I *do* want to call it. Metaclass != eigenclass, which is what
> this really is, so maybe eigenclass.rb - don't let that hang you up
> though, I can always change the names after.
The thing is, Rails already defines #metaclass. So, I thought to check
for that method before extending Object with my own. If
Object.respond_to? :metaclass == true then we are in Rails, or some
other framework that provides the same thing, and so we need not provide
our own. Otherwise we add it.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users