Displaying 4 results from an estimated 4 matches for "mocha_inspect".
2007 Oct 25
0
Fwd: [ mocha-Feature Requests-15021 ] without or not params matcher
...(:create!).with(not.hasKey(:property1)))
But you can''t use not because not is a ruby keyword.
The Not Matcher is just something like:
class Not # :nodoc:
def initialize(matcher)
@matcher = matcher
end
def ==(parameter)
!(matcher == parameter)
end
def mocha_inspect
"not(#{@matcher.mocha_inspect})"
end
end
----------------------------------------------------------------------
>Comment By: James Mead (jamesmead)
Date: 2007-10-25 13:01
Message:
Hi Jerry,
Thanks for the suggestions. I had wanted to add not() a while ago, but ran
in...
2007 Feb 02
0
Fwd: [ mocha-Bugs-7834 ] infinte_range.rb makes incorrect assumption about to_f
Thanks for reporting the bug below.
You''re absolutely right. Renamed Range#to_s implementation to #mocha_inspect
and checked first and last respond_to?(:to_f) as you suggested.
Sorry for the delay - I wasn''t monitoring the rubyforge trackers. I am now!
Should be fixed in revision 99 of trunk.
--
James.
http://blog.floehopper.org
---------- Forwarded message ----------
From: noreply at rubyforge....
2006 Sep 03
0
Reducing object polution and mocha?
...using mocha and stubba and I''ve
> come across one problem. Controllers decide what an action method is
> by grabbing the public instance methods and removing the explicitly
> hidden actions. I''ve got a test failing because Mocha seems to add
> methods (mocha, expects, mocha_inspect, verify...) to every Object. Is
> there a simple way for me to sanitize an object that shouldn''t have
> those methods?
>
> --
> Kevin Clark
> http://glu.ttono.us
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipe...
2009 Apr 09
1
method_exists? is missing?
...instead do this in a console
session, I see this:
$ script/console
>>
>> @entity = Entity.new
=> ...
>> print @entity.methods.sort.to_yaml
...
- logger
- mark_for_destruction
- marked_for_destruction?
- metaclass
- method
- method_exists?
- method_missing
- methods
- mocha
- mocha_inspect
- new_record?
...
However, if I remove the mocha gem (0.9.5) then method_exists?
disappears from Entities created in the console as well.
So, what gives?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are sub...